mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-30 22:34:29 +08:00
Work around WSL access(2) EINVAL bug
See Microsoft/BashOnWindows#2522, Microsoft/BashOnWindows#2448
(cherry picked from commit 56c041b889
)
This commit is contained in:
parent
bcd9c39509
commit
93d352b809
|
@ -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 New Issue
Block a user