Skip to content

Commit 19fa87b

Browse files
committed
Show pnpm install cmd log If error occur
1 parent 7d267e8 commit 19fa87b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

commands/audit/sca/pnpm/pnpm.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,10 @@ func installProjectIfNeeded(pnpmExecPath, workingDir string) (dirForDependencies
119119
err = fmt.Errorf("failed copying project to temp dir: %w", err)
120120
return
121121
}
122-
err = getPnpmCmd(pnpmExecPath, dirForDependenciesCalculation, "install", npm.IgnoreScriptsFlag).GetCmd().Run()
122+
output, err := getPnpmCmd(pnpmExecPath, dirForDependenciesCalculation, "install", npm.IgnoreScriptsFlag).GetCmd().CombinedOutput()
123+
if err != nil {
124+
err = fmt.Errorf("failed to install project: %w\n%s", err, string(output))
125+
}
123126
return
124127
}
125128

0 commit comments

Comments
 (0)