Skip to content

Commit 4776e9a

Browse files
committed
Break a loop when config file found
1 parent 7ffaa35 commit 4776e9a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/oc/admin/diagnostics/config.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,10 @@ func (o DiagnosticsOptions) detectClientConfig() (expected bool, detected bool)
5252
}
5353
}
5454

55-
if o.canOpenConfigFile(path, errmsg) && len(foundPath) == 0 {
55+
if o.canOpenConfigFile(path, errmsg) {
5656
successfulLoad = true
5757
foundPath = path
58+
break
5859
}
5960
}
6061
if len(foundPath) > 0 {

0 commit comments

Comments
 (0)