diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-09-03 15:53:26 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-09-03 15:53:26 -0700 |
commit | 12d858aeb45f6eae3eaecb49ccb6f61affca54cd (patch) | |
tree | a6a06df2210d7496665406a71df4796f9afd919f /run-command.c | |
parent | 3e06f5ff3870279f3bf2f97d4a4256032575055e (diff) | |
parent | a78550831a42db6896e598cd2a8bfb441a958fc8 (diff) | |
download | git-12d858aeb45f6eae3eaecb49ccb6f61affca54cd.tar.gz |
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
Diffstat (limited to 'run-command.c')
-rw-r--r-- | run-command.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/run-command.c b/run-command.c index 606791dc67..f9922b9ecc 100644 --- a/run-command.c +++ b/run-command.c @@ -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; } |