summaryrefslogtreecommitdiffstats
path: root/src/browse.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/browse.cc')
-rw-r--r--src/browse.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/browse.cc b/src/browse.cc
index f65e537..d51bb44 100644
--- a/src/browse.cc
+++ b/src/browse.cc
@@ -20,7 +20,8 @@
#include "../build/browse_py.h"
#include "ninja.h"
-void RunBrowsePython(State* state, const char* ninja_command) {
+void RunBrowsePython(State* state, const char* ninja_command,
+ const char* initial_target) {
// Fork off a Python process and have it run our code via its stdin.
// (Actually the Python process becomes the parent.)
int pipefd[2];
@@ -45,7 +46,7 @@ void RunBrowsePython(State* state, const char* ninja_command) {
// exec Python, telling it to run the program from stdin.
const char* command[] = {
- "python", "-", ninja_command, NULL
+ "python", "-", ninja_command, initial_target, NULL
};
execvp(command[0], (char**)command);
perror("ninja: execvp");