Support "meteor admin help".

(I assume this was intended to work because it is explicitly suggested
when you type "meteor admin"!)
This commit is contained in:
David Glasser
2014-01-31 14:16:00 -05:00
parent ddf38a72ac
commit d954baeaac
2 changed files with 8 additions and 4 deletions

View File

@@ -685,10 +685,12 @@ Fiber(function () {
for (var i = 0; i < rawArgs.length; i++) {
var word = rawArgs[i];
if (word === "help" && i === 0) {
// "meteor help some command" (note that we can't support
// "meteor some command help", since "meteor deploy help"
// needs to actually deploy a site called 'help')
// Support "meteor help", "meteor help deploy", "meteor help admin",
// "meteor admin help", "meteor admin help grant", etc. (But not
// "meteor deploy help" or "meteor admin grant help": once we find an
// actual command, we assume "help" is an argument, eg a site called
// 'help'!)
if (word === "help") {
showHelp = true;
continue;
}

View File

@@ -38,6 +38,7 @@ selftest.define("help", function () {
run.expectExit(0);
};
checkSubcommandList(s.run("help", "admin"));
checkSubcommandList(s.run("admin", "help"));
checkSubcommandList(s.run("admin", "--help"));
checkSubcommandList(s.run("--help", "admin"));
@@ -48,6 +49,7 @@ selftest.define("help", function () {
};
checkSubcommandHelp(s.run("help", "admin", "grant"));
checkSubcommandHelp(s.run("admin", "help", "grant"));
checkSubcommandHelp(s.run("admin", "grant", "--help"));
checkSubcommandHelp(s.run("--help", "admin", "grant"));
});