File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ var CliTlsAllowInsecure bool
2626var DoNotBuild bool
2727var WaitAfterScannerScan bool
2828var StorageUploadSBom string
29+ var DoNotNpmInstall bool
2930
3031func init () {
3132 ctm := os .Getenv ("COMMAND_TIMEOUT" )
@@ -43,6 +44,7 @@ func init() {
4344 DoNotBuild2 , _ := strconv .ParseBool (os .Getenv ("MPS_DO_NOT_BUILD" ))
4445 DoNotBuild = DoNotBuild || DoNotBuild2
4546 WaitAfterScannerScan , _ = strconv .ParseBool (os .Getenv ("WAIT_AFTER_SCANNER_SCAN" ))
47+ DoNotNpmInstall , _ = strconv .ParseBool (os .Getenv ("DO_NOT_NPM_INSTALL" ))
4648}
4749
4850func TlsAllowInsecure () bool {
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ func ScanNpmProject(ctx context.Context) ([]model.Module, error) {
148148
149149func doNpmInstallInDir (ctx context.Context , dir string ) error {
150150 logger := logctx .Use (ctx )
151- if env .DoNotBuild {
151+ if env .DoNotBuild || env . DoNotNpmInstall {
152152 logger .Warn ("lockfile not found, and auto build is disabled, skip" )
153153 return autoBuildDisabled
154154 }
You can’t perform that action at this time.
0 commit comments