diff --git a/lib/config.js b/lib/config.js index d5ef6ec50a5e6..6bfde9845ce33 100644 --- a/lib/config.js +++ b/lib/config.js @@ -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 { diff --git a/test/lib/config.js b/test/lib/config.js index 14cd816171da5..98ece0f4f05c7 100644 --- a/test/lib/config.js +++ b/test/lib/config.js @@ -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)