Merge pull request #2111 from tiborvass/revert-homedir

config: revert to using pkg/homedir
This commit is contained in:
Sebastiaan van Stijn 2019-10-15 11:58:32 +02:00 committed by GitHub
commit 4ce0640a09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -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)
}
}