浏览代码

Merge pull request #20760 from vdemeester/fix-cliconfig

Fixing cliconfig getDefaultConfigDir
Sebastiaan van Stijn 9 年之前
父节点
当前提交
67a77934a4
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      cliconfig/config.go

+ 1 - 1
cliconfig/config.go

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