Skip to content

Commit 465b3c3

Browse files
committed
[plugin] always enable builtin plugin by default.
Signed-off-by: Eric Wang <[email protected]>
1 parent 73bf1a9 commit 465b3c3

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

lib/plugin.js

+10-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ function Plugin(id, name, ver, desc, deps) {
2121

2222
this.enabled = true;
2323
this.deleted = false;
24-
this.missing = (ver === 'missing');
24+
this.missing = (this.ver === 'missing');
25+
this.builtin = (this.ver === 'default');
2526

2627
// only need deps for current platform
2728
this.deps = _.chain(deps || [])
@@ -93,10 +94,15 @@ Plugin.init = function(head) {
9394

9495
p.file = f.file;
9596
p.enabled = stats[p.name];
96-
// not saved before? enable it by default
97+
9798
if (!(p.name in stats)) {
98-
log.trace('new plugin, enable by default');
99-
p.enabled = true;
99+
if (p.builtin) {
100+
log.trace('new builtin plugin, enable by default');
101+
p.enabled = true;
102+
} else {
103+
log.trace('new 3rd party plugin, disable by default');
104+
p.enabled = false;
105+
}
100106
}
101107
installed.push(p);
102108
}

0 commit comments

Comments
 (0)