mirror of
https://github.com/spf13/cobra
synced 2024-11-05 05:17:12 +00:00
Print err instead of home
When 'home' can't be determined it doesn't make sense to print it. The value of 'err' should be printed instead.
This commit is contained in:
parent
6471e3de04
commit
4d647c8944
1 changed files with 1 additions and 1 deletions
|
@ -337,7 +337,7 @@ func initConfig() {
|
|||
// Find home directory.
|
||||
home, err := homedir.Dir()
|
||||
if err != nil {
|
||||
fmt.Println(home)
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue