Don't print an error if file doesn't exist

This commit is contained in:
Corey Johnson 2019-12-03 16:44:37 -08:00
parent 40d45da12d
commit 14561cba9f

View file

@ -32,8 +32,7 @@ func main() {
func migrateConfig() {
p, _ := homedir.Expand("~/.config/gh")
fi, err := os.Stat(p)
if err != nil {
fmt.Fprintf(os.Stderr, "migration error: failed to stat %s", p)
if err != nil { // This means the file doesn't exist, and that is fine.
return
}
if fi.Mode().IsDir() {