Skip to content

Commit

Permalink
Create file if config doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosnils committed Jun 23, 2020
1 parent cae6a22 commit d245f08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/config/config.go
Expand Up @@ -33,7 +33,7 @@ type Binary struct {
func CheckAndLoad() error {
u, _ := user.Current()
f, err := os.OpenFile(filepath.Join(u.HomeDir, ".bin/config.json"), os.O_RDWR|os.O_CREATE, 0666)
if err != nil {
if err != nil && !os.IsNotExist(err) {
return err
}

Expand Down

0 comments on commit d245f08

Please sign in to comment.