Explorar o código

fix(config): use IsNotExist to test missing file

Fixes #125 where a config file never gets created
Brandon Philips %!s(int64=12) %!d(string=hai) anos
pai
achega
bcc77db8a9
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      config.go

+ 1 - 1
config.go

@@ -54,7 +54,7 @@ func readInfo(path string) *Info {
 	file, err := os.Open(path)
 
 	if err != nil {
-		if err == os.ErrNotExist {
+		if os.IsNotExist(err) {
 			return nil
 		}
 		fatal(err)