Skip to content

Commit 0c18f50

Browse files
committed
Don't add analyze plugin when buildOptions == nil
1 parent cc74cd0 commit 0c18f50

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pkg/cli/cli_impl.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,12 +1141,13 @@ func runImpl(osArgs []string) int {
11411141

11421142
osArgs, analyze := filterAnalyzeFlags(osArgs)
11431143
buildOptions, transformOptions, extras, err := parseOptionsForRun(osArgs)
1144-
if analyze != analyzeDisabled {
1145-
addAnalyzePlugin(buildOptions, analyze, osArgs)
1146-
}
11471144

11481145
switch {
11491146
case buildOptions != nil:
1147+
if analyze != analyzeDisabled {
1148+
addAnalyzePlugin(buildOptions, analyze, osArgs)
1149+
}
1150+
11501151
// Read the "NODE_PATH" from the environment. This is part of node's
11511152
// module resolution algorithm. Documentation for this can be found here:
11521153
// https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders

0 commit comments

Comments
 (0)