mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fixing getDefaultConfigDir
It seems it's not really checking the right folder. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
parent
38439733d2
commit
d3fd0974d5
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ var (
|
||||||
func getDefaultConfigDir(confFile string) string {
|
func getDefaultConfigDir(confFile string) string {
|
||||||
confDir := filepath.Join(homedir.Get(), confFile)
|
confDir := filepath.Join(homedir.Get(), confFile)
|
||||||
// if the directory doesn't exist, maybe we called docker with sudo
|
// if the directory doesn't exist, maybe we called docker with sudo
|
||||||
if _, err := os.Stat(configDir); err != nil {
|
if _, err := os.Stat(confDir); err != nil {
|
||||||
if os.IsNotExist(err) {
|
if os.IsNotExist(err) {
|
||||||
return filepath.Join(homedir.GetWithSudoUser(), confFile)
|
return filepath.Join(homedir.GetWithSudoUser(), confFile)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue