Bring back "download from server" perf optimization

Reviewed By: @frantic

Differential Revision: D2515566

fb-gh-sync-id: 25771888390154e9962d141f872cef85c08cd1d0
This commit is contained in:
Martín Bigio authored and facebook-github-bot-4 committed 2015-10-12 06:39:44 -07:00
1 parent 799168929c
commit d30384080a
3 files changed
+53 -35

No files matched your search

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