Skip to content

Commit bb5b40c

Browse files
author
Christopher J. Brody
committed
remove code not needed from npmAddScriptSync.js
(lib/utils/npmAddScriptSync.js) discovered thanks to mutation testing using Stryker
1 parent 3440ded commit bb5b40c

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

lib/utils/npmAddScriptSync.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ module.exports = (packageJsonPath, script, fs) => {
77
try {
88
var packageJson = jsonfile.readFileSync(packageJsonPath, { fs });
99
if (!packageJson.scripts) packageJson.scripts = {};
10-
if (!script.force && packageJson.scripts[script.key]) {
11-
throw new Error(`That script entry for key: ${script.key} already exists.`);
12-
}
1310
packageJson.scripts[script.key] = script.value;
1411
jsonfile.writeFileSync(packageJsonPath, packageJson, { fs, spaces: 2 });
1512
} catch (e) {

0 commit comments

Comments
 (0)