Skip to content

Commit 96f558e

Browse files
committed
Fix promise handling when displaying help
1 parent 06ca4a4 commit 96f558e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ function help() {
4949
" hash-pw - Creates a hash to use for Node-RED settings like \"adminAuth\"\n"
5050
;
5151
console.log(helpText);
52+
return Promise.resolve();
5253
}
5354

5455
module.exports = function(args) {
@@ -63,14 +64,14 @@ module.exports = function(args) {
6364
config.init(argv.u||argv.userDir);
6465
}
6566
if (argv.h || argv.help || argv['?']) {
66-
result.help(commands[command]);
67+
return result.help(commands[command]);
6768
} else {
6869
return commands[command](argv,result).catch(err => {
6970
result.warn(err);
7071
throw err;
7172
});
7273
}
7374
} else {
74-
help();
75+
return help();
7576
}
7677
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-red-admin",
3-
"version": "0.2.5",
3+
"version": "0.2.6",
44
"description": "The Node-RED admin command line interface",
55
"homepage": "http://nodered.org",
66
"bugs": {

0 commit comments

Comments
 (0)