Skip to content

Commit 7ad5b21

Browse files
committed
[Plugin] print help after plugin installed.
Signed-off-by: Eric Wang <[email protected]>
1 parent 39d5be5 commit 7ad5b21

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

lib/commands/plugin.js

+8-6
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,15 @@ function install(src) {
7676
else
7777
return parts[0];
7878
}).join(' ').trim();
79-
if (deps.length === 0) return;
8079

81-
var cmd = 'npm install --save ' + deps;
82-
log.debug(cmd);
83-
require('child_process').execSync(cmd, {
84-
cwd: path.resolve(__dirname, '../..')
85-
});
80+
if (deps.length > 0) {
81+
var cmd = 'npm install --save ' + deps;
82+
log.debug(cmd);
83+
require('child_process').execSync(cmd, {
84+
cwd: path.resolve(__dirname, '../..')
85+
});
86+
}
87+
plugin.help();
8688
});
8789
}
8890

lib/plugin.js

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ Plugin.prototype.setNext = function(next) {
2525
this.next = next;
2626
};
2727

28+
Plugin.prototype.help = function() {};
29+
2830
Plugin.plugins = [];
2931

3032
Plugin.init = function(head) {

0 commit comments

Comments
 (0)