Skip to content

Commit

Permalink
fix: config should not error when workspaces are configured
Browse files Browse the repository at this point in the history
PR-URL: #2945
Credit: @nlf
Close: #2945
Reviewed-by: @wraithgar
  • Loading branch information
nlf authored and wraithgar committed Mar 24, 2021
1 parent 98efade commit e8d2adc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/config.js
Expand Up @@ -88,6 +88,10 @@ class Config extends BaseCommand {
this.config(args).then(() => cb()).catch(cb)
}

execWorkspaces (args, filters, cb) {
this.exec(args, cb)
}

async config ([action, ...args]) {
this.npm.log.disableProgress()
try {
Expand Down
7 changes: 7 additions & 0 deletions test/lib/config.js
Expand Up @@ -93,6 +93,13 @@ t.test('config no args', t => {
})
})

t.test('config ignores workspaces', t => {
config.execWorkspaces([], [], (err) => {
t.match(err, /usage instructions/, 'should not error out when workspaces are defined')
t.end()
})
})

t.test('config list', t => {
t.plan(2)

Expand Down

0 comments on commit e8d2adc

Please sign in to comment.