Skip to content
Merged
2 changes: 1 addition & 1 deletion lib/base-cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class BaseCommand {
}

if (config.get('workspaces') === false && config.get('workspace').length) {
throw new Error('Can not use --no-workspaces and --workspace at the same time')
throw new Error('Cannot use --no-workspaces and --workspace at the same time')
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/commands/audit.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Audit extends ArboristWorkspaceCmd {
async auditAdvisories (args) {
const fix = args[0] === 'fix'
if (this.npm.config.get('package-lock') === false && fix) {
throw this.usageError('fix can not be used without a package-lock')
throw this.usageError('fix cannot be used without a package-lock')
}
const reporter = this.npm.config.get('json') ? 'json' : 'detail'
const Arborist = require('@npmcli/arborist')
Expand Down
6 changes: 3 additions & 3 deletions lib/commands/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const { redact } = require('@npmcli/redact')
// validate valid configs during "npm config set", and folks may have old
// invalid entries lying around in a config file that we still want to protect
// when running "npm config list"
// This is a more general list of values to consider protected. You can not
// This is a more general list of values to consider protected. You cannot
// "npm config get" them, and they will not display during "npm config list"
const protected = [
'auth',
Expand Down Expand Up @@ -176,7 +176,7 @@ class Config extends BaseCommand {
const deprecated = this.npm.config.definitions[baseKey]?.deprecated
if (deprecated) {
throw new Error(
`The \`${baseKey}\` option is deprecated, and can not be set in this way${deprecated}`
`The \`${baseKey}\` option is deprecated, and cannot be set in this way${deprecated}`
)
}

Expand All @@ -203,7 +203,7 @@ class Config extends BaseCommand {
for (const key of keys) {
const val = this.npm.config.get(key)
if (isPrivate(key, val)) {
throw new Error(`The ${key} option is protected, and can not be retrieved in this way`)
throw new Error(`The ${key} option is protected, and cannot be retrieved in this way`)
}

const pref = keys.length > 1 ? `${key}=` : ''
Expand Down
2 changes: 1 addition & 1 deletion test/lib/npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ t.test('npm.load', async t => {
})
await t.rejects(
npm.exec('run', []),
/Can not use --no-workspaces and --workspace at the same time/
/Cannot use --no-workspaces and --workspace at the same time/
)
})

Expand Down