X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git.c;h=4588a8bac21a12240c84eac4b24d68cb72920d80;hb=f1f523eae99020d58ad6e7a1ef8187569e15c270;hp=807d875ae06ce7bbf61bb846c5b4cb5a51855eba;hpb=e34bbd3b3c3c12e4131e836486cb733fd1f7feed;p=git.git diff --git a/git.c b/git.c index 807d875ae..4588a8bac 100644 --- a/git.c +++ b/git.c @@ -416,13 +416,9 @@ static void execv_dashed_external(const char **argv) * if we fail because the command is not found, it is * OK to return. Otherwise, we just pass along the status code. */ - status = run_command_v_opt(argv, 0); - if (status != -ERR_RUN_COMMAND_EXEC) { - if (IS_RUN_COMMAND_ERR(status)) - die("unable to run '%s'", argv[0]); - exit(-status); - } - errno = ENOENT; /* as if we called execvp */ + status = run_command_v_opt(argv, RUN_SILENT_EXEC_FAILURE); + if (status >= 0 || errno != ENOENT) + exit(status); argv[0] = tmp;