mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
@@ -322,15 +322,12 @@ var longHelp = exports.longHelp = function (commandName) {
|
||||
_.each(node, function (n, shortName) {
|
||||
var fullName = commandName + (commandName.length > 0 ? " " : "") +
|
||||
shortName;
|
||||
// For now, we don't include commands with subcommands in the
|
||||
// list -- if you have a command 'admin grant' then 'admin' does
|
||||
// not appear in the top-level help. If we one day want to make
|
||||
// these kinds of commands visible to casual users, we'll need a
|
||||
// way to mark them as visible or hidden.
|
||||
|
||||
// Also, use helpDict to only include commands that have help text,
|
||||
// otherwise there is nothing to display
|
||||
if (n instanceof Command && ! n.hidden && helpDict[fullName])
|
||||
// Use helpDict to only include commands that have help text, otherwise
|
||||
// there is nothing to display.
|
||||
// For now, there's no way to mark commands with subcommands (eg 'admin')
|
||||
// as hidden.
|
||||
if (! n.hidden && helpDict[fullName])
|
||||
commandsWanted[fullName] = { name: shortName };
|
||||
});
|
||||
|
||||
|
||||
@@ -9,8 +9,9 @@ selftest.define("help", function () {
|
||||
run.read("Usage: meteor");
|
||||
run.match("Commands:");
|
||||
run.match(/create\s*Create a new project/);
|
||||
run.match(/\s*admin\s/);
|
||||
run.expectExit(0);
|
||||
run.forbidAll(/^\s*admin\s/); // no subcommands
|
||||
run.forbidAll(/^\s*maintainers\s/); // no subcommands
|
||||
run.forbidAll(/^\s*dummy\s/); // no hidden commands
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user