diff --git a/pkg/credentialprovider/config.go b/pkg/credentialprovider/config.go index a877658667..729483a291 100644 --- a/pkg/credentialprovider/config.go +++ b/pkg/credentialprovider/config.go @@ -60,7 +60,7 @@ var ( preferredPathLock sync.Mutex preferredPath = "" workingDirPath = "" - homeDirPath = os.Getenv("HOME") + homeDirPath, _ = os.UserHomeDir() rootDirPath = "/" homeJsonDirPath = filepath.Join(homeDirPath, ".docker") rootJsonDirPath = filepath.Join(rootDirPath, ".docker")