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/configfile"
|
||||||
"github.com/docker/cli/cli/config/credentials"
|
"github.com/docker/cli/cli/config/credentials"
|
||||||
"github.com/docker/cli/cli/config/types"
|
"github.com/docker/cli/cli/config/types"
|
||||||
|
"github.com/docker/docker/pkg/homedir"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -27,10 +28,7 @@ var (
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
if configDir == "" {
|
if configDir == "" {
|
||||||
homedir, err := os.UserHomeDir()
|
configDir = filepath.Join(homedir.Get(), configFileDir)
|
||||||
if err == nil {
|
|
||||||
configDir = filepath.Join(homedir, configFileDir)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue