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,12 +28,11 @@ var (
|
|||
func init() {
|
||||
if configDir == "" {
|
||||
homedir, err := os.UserHomeDir()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if err == nil {
|
||||
configDir = filepath.Join(homedir, configFileDir)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Dir returns the directory the configuration file is stored in
|
||||
func Dir() string {
|
||||
|
|
Loading…
Reference in New Issue