Skip to content

Commit

Permalink
NO-ISSUE: Fix error log printing the wrong error variable (#413)
Browse files Browse the repository at this point in the history
`err` didn't get re-assigned so it always held a previously assigned
`nil` leading to an uninformative error message
  • Loading branch information
omertuc committed Feb 10, 2022
1 parent 577473b commit ff32f3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/config/dry_run_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ func ProcessDryRunArgs() {
flag.Parse()

if GlobalDryRunConfig.DryRunEnabled {
if DryParseClusterHosts(GlobalDryRunConfig.DryRunClusterHostsPath, &GlobalDryRunConfig.ParsedClusterHosts) != nil {
fmt.Printf("Error parsing cluster hosts: %v", err)
if parseErr := DryParseClusterHosts(GlobalDryRunConfig.DryRunClusterHostsPath, &GlobalDryRunConfig.ParsedClusterHosts); parseErr != nil {
fmt.Printf("Error parsing cluster hosts: %v", parseErr)
os.Exit(1)
}
}
Expand Down

0 comments on commit ff32f3b

Please sign in to comment.