Handle non IsNotExist errors in config (#1251)
Co-authored-by: Asim Aslam <asim@aslam.me>
This commit is contained in:
		| @@ -53,6 +53,8 @@ func Set(key, value string) error { | ||||
| 	// write the file if it does not exist | ||||
| 	if _, err := os.Stat(fp); os.IsNotExist(err) { | ||||
| 		ioutil.WriteFile(fp, []byte{}, 0644) | ||||
| 	} else if err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	// create a new config | ||||
|   | ||||
		Reference in New Issue
	
	Block a user