Skip to content
Permalink
Browse files
Properly return Promises from commands
  • Loading branch information
raphinesse committed Mar 31, 2019
1 parent 135cd53 commit 41c0d6c99b89fb298eb0980061caca4d96e5f227
Showing 1 changed file with 3 additions and 3 deletions.
@@ -73,23 +73,23 @@ module.exports = {
return console.log(plugman.help());
}
const cli_variables = expandCliVariables(cli_opts.variable);
plugman.create(cli_opts.name, cli_opts.plugin_id, cli_opts.plugin_version, cli_opts.path || '.', cli_variables);
return plugman.create(cli_opts.name, cli_opts.plugin_id, cli_opts.plugin_version, cli_opts.path || '.', cli_variables);
},

platform (cli_opts) {
var operation = cli_opts.argv.remain[ 0 ] || '';
if ((operation !== 'add' && operation !== 'remove') || !cli_opts.platform_name) {
return console.log(plugman.help());
}
plugman.platform({ operation: operation, platform_name: cli_opts.platform_name });
return plugman.platform({ operation: operation, platform_name: cli_opts.platform_name });
},

createpackagejson (cli_opts) {
var plugin_path = cli_opts.argv.remain[0];
if (!plugin_path) {
return console.log(plugman.help());
}
plugman.createpackagejson(plugin_path);
return plugman.createpackagejson(plugin_path);
}
};

0 comments on commit 41c0d6c

Please sign in to comment.