diff --git a/pkg/cli/cli_impl.go b/pkg/cli/cli_impl.go index 8e292cc315..b91007ee2a 100644 --- a/pkg/cli/cli_impl.go +++ b/pkg/cli/cli_impl.go @@ -1141,12 +1141,13 @@ func runImpl(osArgs []string) int { osArgs, analyze := filterAnalyzeFlags(osArgs) buildOptions, transformOptions, extras, err := parseOptionsForRun(osArgs) - if analyze != analyzeDisabled { - addAnalyzePlugin(buildOptions, analyze, osArgs) - } switch { case buildOptions != nil: + if analyze != analyzeDisabled { + addAnalyzePlugin(buildOptions, analyze, osArgs) + } + // Read the "NODE_PATH" from the environment. This is part of node's // module resolution algorithm. Documentation for this can be found here: // https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders