소스 검색

Fixing getDefaultConfigDir

It seems it's not really checking the right folder.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Vincent Demeester 9 년 전
부모
커밋
d3fd0974d5
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      cliconfig/config.go

+ 1 - 1
cliconfig/config.go

@@ -32,7 +32,7 @@ var (
 func getDefaultConfigDir(confFile string) string {
 	confDir := filepath.Join(homedir.Get(), confFile)
 	// 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) {
 			return filepath.Join(homedir.GetWithSudoUser(), confFile)
 		}