run_command: report system call errors instead of returning error codes
[gitweb.git] / git.c
diff --git a/git.c b/git.c
index d223eab62f0b4e6a9d2e17edfbad4245c17b63d4..03726eee5e186552b3eb11d3c8b357c006caa9f1 100644 (file)
--- a/git.c
+++ b/git.c
@@ -417,12 +417,8 @@ static void execv_dashed_external(const char **argv)
         * 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 (status < 0)
-                       die("unable to run '%s'", argv[0]);
+       if (status >= 0 || errno != ENOENT)
                exit(status);
-       }
-       errno = ENOENT; /* as if we called execvp */
 
        argv[0] = tmp;