Explorar el Código

Fix error when no vsc_config exists

morganamilo hace 7 años
padre
commit
4da65a6a22
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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)