Skip to content

Commit e8d2adc

Browse files
nlfwraithgar
authored andcommitted
fix: config should not error when workspaces are configured
PR-URL: #2945 Credit: @nlf Close: #2945 Reviewed-by: @wraithgar
1 parent 98efade commit e8d2adc

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

lib/config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ class Config extends BaseCommand {
8888
this.config(args).then(() => cb()).catch(cb)
8989
}
9090

91+
execWorkspaces (args, filters, cb) {
92+
this.exec(args, cb)
93+
}
94+
9195
async config ([action, ...args]) {
9296
this.npm.log.disableProgress()
9397
try {

test/lib/config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ t.test('config no args', t => {
9393
})
9494
})
9595

96+
t.test('config ignores workspaces', t => {
97+
config.execWorkspaces([], [], (err) => {
98+
t.match(err, /usage instructions/, 'should not error out when workspaces are defined')
99+
t.end()
100+
})
101+
})
102+
96103
t.test('config list', t => {
97104
t.plan(2)
98105

0 commit comments

Comments
 (0)