Skip to content

Commit 30e5f30

Browse files
phil-rzkat
authored andcommitted
fix(full-report): Fix install flag for devDependencies (#14)
1 parent de602bb commit 30e5f30

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

reporters/detail.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ const getRecommendation = function (action, config) {
176176
const isDev = action.resolves[0].dev
177177

178178
return {
179-
cmd: `npm install ${isDev ? '--dev ' : ''}${action.module}@${action.target}`,
179+
cmd: `npm install ${isDev ? '--save-dev ' : ''}${action.module}@${action.target}`,
180180
isBreaking: action.isMajor
181181
}
182182
} else {

test/detail-report-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ tap.test('it generates a detail report with one vuln (install action)', function
3131
tap.test('it generates a detail report with one vuln (install dev dep)', function (t) {
3232
return Report(fixtures['one-vuln-dev'], {reporter: 'detail'}).then((report) => {
3333
t.match(report.exitCode, 1)
34-
t.match(report.report, /npm install --dev knex@3.0.0/)
34+
t.match(report.report, /npm install --save-dev knex@3.0.0/)
3535
})
3636
})
3737

0 commit comments

Comments
 (0)