Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Unified Diff: tools/gn/gn_main.cc

Issue 165823003: GN: Change gen command syntax, support relative dirs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change in build file writing Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/gn/gn_main.cc
diff --git a/tools/gn/gn_main.cc b/tools/gn/gn_main.cc
index 86360cb9fc4d4f29bbc7a75334f34c346f499dbf..a4158d43ebb24314d6fcc319f8f613b1fea581b0 100644
--- a/tools/gn/gn_main.cc
+++ b/tools/gn/gn_main.cc
@@ -53,7 +53,11 @@ int main(int argc, char** argv) {
OutputString(std::string(LAST_CHANGE) + "\n");
exit(0);
} else if (args.empty()) {
- command = commands::kGen;
+ // No command, print error and exit.
+ Err(Location(), "No command specified.",
+ "Most commonly you want \"gn gen <out_dir>\" to make a build dir.\n"
+ "Or try \"gn help\" for more commands.").PrintToStdout();
+ return 1;
} else {
command = args[0];
args.erase(args.begin());

Powered by Google App Engine
This is Rietveld 408576698