diff options
author | Jan Niklas Hasse <jhasse@bixense.com> | 2018-11-14 15:57:12 (GMT) |
---|---|---|
committer | Jan Niklas Hasse <jhasse@bixense.com> | 2018-11-14 15:57:12 (GMT) |
commit | a63fb13322aac3ca56e008757eb0514d96549ab5 (patch) | |
tree | ca047039e354614821aef00c37794080923fde56 | |
parent | 2108bb31030e9109eb7911115d7ce0b1f6c238ea (diff) | |
download | Ninja-a63fb13322aac3ca56e008757eb0514d96549ab5.zip Ninja-a63fb13322aac3ca56e008757eb0514d96549ab5.tar.gz Ninja-a63fb13322aac3ca56e008757eb0514d96549ab5.tar.bz2 |
Improve error message when Python wasn't found for the browse tool
See #1306.
-rw-r--r-- | src/browse.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/browse.cc b/src/browse.cc index 14900f8..c08c9f4 100644 --- a/src/browse.cc +++ b/src/browse.cc @@ -14,6 +14,7 @@ #include "browse.h" +#include <errno.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> @@ -57,7 +58,11 @@ void RunBrowsePython(State* state, const char* ninja_command, } command.push_back(NULL); execvp(command[0], (char**)&command[0]); - perror("ninja: execvp"); + if (errno == ENOENT) { + printf("ninja: %s is required for the browse tool\n", NINJA_PYTHON); + } else { + perror("ninja: execvp"); + } } while (false); _exit(1); } else { // Child. |