ソースを参照

Fix error when no vsc_config exists

morganamilo 7 年 前
コミット
4da65a6a22
1 ファイル変更1 行追加1 行削除
  1. 1 1
      cmd.go

+ 1 - 1
cmd.go

@@ -120,7 +120,7 @@ func initYay() (err error) {
 	////////////////
 	updated = false
 
-	vfile, err := os.Open(vcsFile)
+	vfile, err := os.OpenFile(vcsFile, os.O_RDONLY|os.O_CREATE, 0644)
 	if err == nil {
 		defer vfile.Close()
 		decoder := json.NewDecoder(vfile)