mirror of
https://github.com/spf13/cobra
synced 2025-05-05 21:07:24 +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
d638dcb7c7
commit
1f8ddda212
1 changed files with 1 additions and 1 deletions
|
@ -337,7 +337,7 @@ func main() {
|
|||
// Find home directory.
|
||||
home, err := homedir.Dir()
|
||||
if err != nil {
|
||||
fmt.Println(home)
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue