Skip to content

Commit

Permalink
Add --ignore-scripts flag to Node project installs
Browse files Browse the repository at this point in the history
Signed-off-by: Timothy Johnson <[email protected]>
  • Loading branch information
t1m0thyj committed Sep 26, 2024
1 parent 3ccd9ad commit d289fce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions licenses/dependency-scan/src/actions/base/InstallAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ export class InstallAction implements IAction {
//default npm install prod
let installCmd = "npm";
let installArgs = ["install", "--omit=dev", ...registry];

if (Utilities.hasPnpmLockFile(`${absDir}`)) {
installCmd = "pnpm";
installArgs = ["install", "--frozen-lockfile", "--prod", ...registry]
installArgs = ["install", "--frozen-lockfile", "--prod", "--ignore-scripts", ...registry]
} else if (Utilities.hasNpmLockfile(`${absDir}`)) {
installArgs = ["ci", "--omit=dev", ...registry]
installArgs = ["ci", "--omit=dev", "--ignore-scripts", ...registry]
} else if (Utilities.hasYarnLockfile(`${absDir}`)) {
installCmd = "yarn";
installArgs = ["install", "--production", "--frozen-lockfile", "--ignore-engines", ...registry]
installArgs = ["install", "--production", "--frozen-lockfile", "--ignore-engines", "--ignore-scripts", ...registry]
}

if (fs.existsSync(path.join(absDir, "node_modules"))) {
Expand Down

0 comments on commit d289fce

Please sign in to comment.