Revert D2531438

Differential Revision: D2531532

fb-gh-sync-id: c86bbcde3254df78f3dca88285ef1cd5a3563123
This commit is contained in:
Andrei Coman authored and facebook-github-bot-3 committed 2015-10-12 08:36:27 -07:00
1 parent c075be6cab
commit 96dda4bf5f
3 files changed
+35 -53

No files matched your search

+4 -7
View File
@@ -29,16 +29,16 @@ const hiddenCommands = {
*/
function run(command, commandArgs) {
if (!command) {
return Promise.reject(helpMessage());
throw new Error(helpMessage());
}
commandArgs = commandArgs || [];
const commandToExec = documentedCommands[command] || hiddenCommands[command];
if (!commandToExec) {
return Promise.reject(helpMessage(command));
throw new Error(helpMessage(command));
}
return commandToExec(commandArgs, Config.get());
commandToExec(commandArgs, Config.get()).done();
}
function helpMessage(command) {
@@ -61,7 +61,4 @@ function help() {
return Promise.resolve();
}
module.exports = {
run: run,
commands: documentedCommands,
};
module.exports.run = run;