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
  • Loading branch information
nlf committed Mar 24, 2021
1 parent c0b392c commit 76f0121
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 76f0121

Please sign in to comment.