mirror of https://github.com/k3s-io/k3s
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/#UserHomeDirk3s-v1.15.3
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