Skip to content

Commit 2994a59

Browse files
committed
refactor: remove unnecessary condition
1 parent 2cd4d86 commit 2994a59

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/run-npm-script.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@ export async function runNpmScript(script: NpmScript, operation: Operation): Pro
1212

1313
let { data: manifest } = await readJsonFile("package.json", cwd);
1414

15-
if (isManifest(manifest) && hasScript(manifest, script)) {
16-
if (!operation.options.ignoreScripts) {
17-
await ezSpawn.async("npm", ["run", script, "--silent"], { stdio: "inherit" });
18-
operation.update({ event: ProgressEvent.NpmScript, script });
19-
}
15+
if (!operation.options.ignoreScripts && (isManifest(manifest) && hasScript(manifest, script))) {
16+
await ezSpawn.async("npm", ["run", script, "--silent"], { stdio: "inherit" });
17+
operation.update({ event: ProgressEvent.NpmScript, script });
2018
}
2119

2220
return operation;

0 commit comments

Comments
 (0)