mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Work around WSL access(2) EINVAL bug
See Microsoft/BashOnWindows#2522, Microsoft/BashOnWindows#2448
This commit is contained in:
parent
6972dee37e
commit
56c041b889
1 changed files with 7 additions and 0 deletions
|
@ -86,6 +86,13 @@ static bool path_get_path_core(const wcstring &cmd, wcstring *out_path,
|
||||||
case ENOTDIR: {
|
case ENOTDIR: {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
//WSL has a bug where access(2) can return EINVAL
|
||||||
|
//See https://github.com/Microsoft/BashOnWindows/issues/2522
|
||||||
|
//The only other way EINVAL can happen is if the wrong
|
||||||
|
//mode was specified, but we have X_OK hard-coded above.
|
||||||
|
case EINVAL: {
|
||||||
|
break;
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
debug(1, MISSING_COMMAND_ERR_MSG, next_path.c_str());
|
debug(1, MISSING_COMMAND_ERR_MSG, next_path.c_str());
|
||||||
wperror(L"access");
|
wperror(L"access");
|
||||||
|
|
Loading…
Reference in a new issue