Skip to content

Commit

Permalink
fix: handle other errors
Browse files Browse the repository at this point in the history
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
  • Loading branch information
bashbunni and caarlos0 committed Jun 1, 2023
1 parent 4421ab1 commit 5d5a228
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Expand Up @@ -231,6 +231,10 @@ func deleteDb(cmd *cobra.Command, args []string) error {
fmt.Printf("%q does not exist, %s\n", args[0], err.Error())
os.Exit(1)
}
if err != nil {
fmt.Printf("unexpected error: %s", err.Error())

Check failure on line 235 in main.go

View workflow job for this annotation

GitHub Actions / lint

File is not `goimports`-ed (goimports)

Check failure on line 235 in main.go

View workflow job for this annotation

GitHub Actions / lint

File is not `goimports`-ed (goimports)
os.Exit(1)
}
var confirmation string
fmt.Printf("are you sure you want to delete '%s' and all its contents?(y/n) ", warningStyle.Render(path))
fmt.Scanln(&confirmation)
Expand Down

0 comments on commit 5d5a228

Please sign in to comment.