diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-04-20 15:50:03 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-04-20 15:50:03 -0700 |
commit | bd6f71d1fca865507b3f0a9e310b4d02632cf0ce (patch) | |
tree | 9ec8bf5af578538c1f690e8169fc123cb7434dea /compat/mingw.c | |
parent | 27da1cf65b9f30a51c061409c697f94b9b56b09c (diff) | |
parent | 38f865c27d1f2560afb48efd2b7b105c1278c4b5 (diff) | |
download | git-bd6f71d1fca865507b3f0a9e310b4d02632cf0ce.tar.gz git-bd6f71d1fca865507b3f0a9e310b4d02632cf0ce.tar.xz |
Merge branch 'jk/run-command-eacces'
When PATH contains an unreadable directory, alias expansion code did not
kick in, and failed with an error that said "git-subcmd" was not found.
By Jeff King (1) and Ramsay Jones (1)
* jk/run-command-eacces:
run-command: treat inaccessible directories as ENOENT
compat/mingw.[ch]: Change return type of exec functions to int
Diffstat (limited to 'compat/mingw.c')
-rw-r--r-- | compat/mingw.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compat/mingw.c b/compat/mingw.c index a0ac487c0..afc892d6b 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -1003,7 +1003,7 @@ static void mingw_execve(const char *cmd, char *const *argv, char *const *env) } } -void mingw_execvp(const char *cmd, char *const *argv) +int mingw_execvp(const char *cmd, char *const *argv) { char **path = get_path_split(); char *prog = path_lookup(cmd, path, 0); @@ -1015,11 +1015,13 @@ void mingw_execvp(const char *cmd, char *const *argv) errno = ENOENT; free_path_split(path); + return -1; } -void mingw_execv(const char *cmd, char *const *argv) +int mingw_execv(const char *cmd, char *const *argv) { mingw_execve(cmd, argv, environ); + return -1; } int mingw_kill(pid_t pid, int sig) |