mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Revert D2531438
Differential Revision: D2531532 fb-gh-sync-id: c86bbcde3254df78f3dca88285ef1cd5a3563123
This commit is contained in:
1 parent
c075be6cab
commit
96dda4bf5f
3 files changed
+35
-53
No files matched your search
@@ -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;
|
||||
Reference in new issue
Block a user