Skip to content

Commit

Permalink
[FIX] linter issue
Browse files Browse the repository at this point in the history
  • Loading branch information
HappyTobi committed Jun 6, 2023
1 parent 7fe8541 commit 367bbeb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ func initConfig() {
}

if _, err := os.Stat(configFilePath); os.IsNotExist(err) {
os.WriteFile(configFilePath, []byte{}, 0644)
if err := os.WriteFile(configFilePath, []byte{}, 0644); err != nil {
fmt.Print("Error while creating config file")
os.Exit(1)
}
}

if err := viper.WriteConfig(); err != nil {
Expand Down

0 comments on commit 367bbeb

Please sign in to comment.