mirror of https://github.com/docker/cli.git
Merge pull request #2111 from tiborvass/revert-homedir
config: revert to using pkg/homedir
This commit is contained in:
commit
4ce0640a09
|
@ -10,6 +10,7 @@ import (
|
|||
"github.com/docker/cli/cli/config/configfile"
|
||||
"github.com/docker/cli/cli/config/credentials"
|
||||
"github.com/docker/cli/cli/config/types"
|
||||
"github.com/docker/docker/pkg/homedir"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
|
@ -27,10 +28,7 @@ var (
|
|||
|
||||
func init() {
|
||||
if configDir == "" {
|
||||
homedir, err := os.UserHomeDir()
|
||||
if err == nil {
|
||||
configDir = filepath.Join(homedir, configFileDir)
|
||||
}
|
||||
configDir = filepath.Join(homedir.Get(), configFileDir)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue