Skip to content

Commit

Permalink
comment with context
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Abro <[email protected]>
  • Loading branch information
AustinAbro321 committed Nov 6, 2024
1 parent 26170fe commit 3696fff
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/cmd/common/viper.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,10 @@ func PrintViperConfigUsed(ctx context.Context) error {
if vConfigError != nil {
return fmt.Errorf("unable to load config file: %w", vConfigError)
}
cfgFile := v.ConfigFileUsed()
l.Info("using config file", "location", cfgFile)
// Zarf skips loading the config file for version and tool commands, this avoids output in those cases
if cfgFile := v.ConfigFileUsed(); cfgFile != "" {
l.Info("using config file", "location", cfgFile)
}
return nil
}

Expand Down

0 comments on commit 3696fff

Please sign in to comment.