Skip to content

Commit

Permalink
fix: npm-lock-parser npm-shrinkwrap's error msg.
Browse files Browse the repository at this point in the history
  • Loading branch information
anthogez committed Feb 25, 2020
1 parent 953fe91 commit 9b1e682
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/lib/plugins/nodejs-plugin/npm-lock-parser.ts
Expand Up @@ -33,10 +33,10 @@ export async function parse(

if (fs.existsSync(shrinkwrapFullPath)) {
throw new Error(
'`npm-shrinkwrap.json` was found while using lockfile.\n' +
'Please run your command again without `--file=' +
targetFile +
'` flag.',
'Both `npm-shrinkwrap.json` and `package-lock.json` were found in ' +
fullPath.dir +
'.\n' +
'Please run your command again specifying `--file=package.json` flag.',
);
}

Expand Down
2 changes: 1 addition & 1 deletion test/acceptance/cli-test/cli-test.npm.spec.ts
Expand Up @@ -208,7 +208,7 @@ export const NpmTests: AcceptanceTests = {
} catch (e) {
t.includes(
e.message,
'--file=package-lock.json',
'--file=package.json',
'Contains enough info about err',
);
}
Expand Down

0 comments on commit 9b1e682

Please sign in to comment.