Skip to content

Commit

Permalink
Merge pull request #1 from wakurobotics/fix/silent-fail
Browse files Browse the repository at this point in the history
fix(cmd): show error when loading config file
  • Loading branch information
FPurchess authored Jan 19, 2024
2 parents 415f999 + ea3313b commit 7db86bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ func initConfig() {

if err := viper.ReadInConfig(); err == nil {
fmt.Println("Using config file:", viper.ConfigFileUsed())
} else {
fmt.Printf("Error reading config from '%s': %v", viper.ConfigFileUsed(), err)
os.Exit(1)
}
}

Expand Down

0 comments on commit 7db86bd

Please sign in to comment.