Merge branch 'jc/maint-sane-execvp-notdir'
"git foo" errored out with "Not a directory" when the user had a non directory on $PATH, and worse yet it masked an alias "foo" to run. * jc/maint-sane-execvp-notdir: sane_execvp(): ignore non-directory on $PATH
This commit is contained in:
commit
12d858aeb4
@ -139,6 +139,8 @@ int sane_execvp(const char *file, char * const argv[])
|
||||
*/
|
||||
if (errno == EACCES && !strchr(file, '/'))
|
||||
errno = exists_in_PATH(file) ? EACCES : ENOENT;
|
||||
else if (errno == ENOTDIR && !strchr(file, '/'))
|
||||
errno = ENOENT;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user