summaryrefslogtreecommitdiffstats
path: root/src/ninja.cc
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2016-03-11 23:24:00 (GMT)
committerPeter Wu <peter@lekensteyn.nl>2016-03-11 23:24:00 (GMT)
commit048ad189e16917b26c370669c9b978d9fd23bae2 (patch)
tree03718671c2673f15e91b4e7f5aaf708807e7af8e /src/ninja.cc
parentf7491398a2e97c7c76d5a28cfb3b8ce1a0a1a580 (diff)
downloadNinja-048ad189e16917b26c370669c9b978d9fd23bae2.zip
Ninja-048ad189e16917b26c370669c9b978d9fd23bae2.tar.gz
Ninja-048ad189e16917b26c370669c9b978d9fd23bae2.tar.bz2
browse: support --port and --no-browser options
Add --port option to override the default port (8000). Add --no-browser option to avoid opening a web browser (useful over SSH). Make the target name optional, using "all" if omitted.
Diffstat (limited to 'src/ninja.cc')
-rw-r--r--src/ninja.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/ninja.cc b/src/ninja.cc
index 35f293b..b3b9bed 100644
--- a/src/ninja.cc
+++ b/src/ninja.cc
@@ -371,11 +371,7 @@ int NinjaMain::ToolQuery(int argc, char* argv[]) {
#if defined(NINJA_HAVE_BROWSE)
int NinjaMain::ToolBrowse(int argc, char* argv[]) {
- if (argc < 1) {
- Error("expected a target to browse");
- return 1;
- }
- RunBrowsePython(&state_, ninja_command_, argv[0]);
+ RunBrowsePython(&state_, ninja_command_, argc, argv);
// If we get here, the browse failed.
return 1;
}