mirror of https://github.com/docker/cli.git
config: keep configDir empty when homedir errors
Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
parent
0397c2ca01
commit
47f059db7a
|
@ -28,10 +28,9 @@ var (
|
||||||
func init() {
|
func init() {
|
||||||
if configDir == "" {
|
if configDir == "" {
|
||||||
homedir, err := os.UserHomeDir()
|
homedir, err := os.UserHomeDir()
|
||||||
if err != nil {
|
if err == nil {
|
||||||
panic(err)
|
configDir = filepath.Join(homedir, configFileDir)
|
||||||
}
|
}
|
||||||
configDir = filepath.Join(homedir, configFileDir)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue