mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 22:46:12 +00:00
credentialprovider: Sets homeDirPath to os.UserHomeDir()
Currently, the credential provider will look in the path set in the $HOME env variable, but that environment does not exist on Windows, but $HOMEPATH does. Because of this, if credentials are set in ~/.docker on Windows, they will not be used by kubelet when pulling images. The function os.UserHomeDir can solve this problem [1]. [1] https://golang.org/pkg/os/#UserHomeDir
This commit is contained in:
parent
44a3bf4755
commit
16da70c249
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user