Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Nola <[email protected]>
  • Loading branch information
dereknola committed Nov 8, 2022
1 parent ff13cf6 commit 84ec7fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/k3s/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,16 @@ func findDataDir() string {
// findPreferBundledBin searches for prefer-bundled-bin from the CLI args and config file.
func findPreferBundledBin(args []string) bool {
preferRes := configfilearg.MustFindString(args, "prefer-bundled-bin")
flagName := "--prefer-bundled-bin"
for i, arg := range args {
flagName := "--prefer-bundled-bin"
if flagName == arg {
if len(args) > i+1 {
if res, err := strconv.ParseBool(args[i+1]); err == nil {
return res
}
}
//Naked flag, assume true
return true
preferRes = "true"
} else if strings.HasPrefix(arg, flagName+"=") {
preferRes = arg[len(flagName)+1:]
}
Expand Down

0 comments on commit 84ec7fb

Please sign in to comment.