فهرست منبع

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)