Index: tools/gn/gn_main.cc |
diff --git a/tools/gn/gn_main.cc b/tools/gn/gn_main.cc |
index 135ed561a9cb9f7b9ca83e25db1db77e397edd02..245270ee52d01e56687b3eeba48f9f0b6de98939 100644 |
--- a/tools/gn/gn_main.cc |
+++ b/tools/gn/gn_main.cc |
@@ -73,9 +73,12 @@ int main(int argc, char** argv) { |
if (found_command != command_map.end()) { |
retval = found_command->second.runner(args); |
} else { |
- Err(Location(), |
- "Command \"" + command + "\" unknown.").PrintToStdout(); |
- commands::RunHelp(std::vector<std::string>()); |
+ Err(Location(), "Command \"" + command + "\" unknown.").PrintToStdout(); |
+ OutputString( |
+ "Available commands (type \"gn help <command>\" for more details):\n"); |
+ for (const auto& cmd : commands::GetCommands()) |
+ PrintShortHelp(cmd.second.help_short); |
+ |
retval = 1; |
} |