Skip to content

Commit cf436e6

Browse files
committed
warn
1 parent 1ab7381 commit cf436e6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmd/reset.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ func runReset(cmd *cobra.Command, args []string) error {
7777
WHERE datname = '%s' AND pid <> pg_backend_pid()
7878
`, dbName)
7979

80-
_, _ = db.Exec(terminateQuery) // Ignore errors, database might not exist
80+
_, err = db.Exec(terminateQuery) // Ignore errors, database might not exist
81+
if err != nil {
82+
logger.Warn("Failed to terminate existing connections", "error", err)
83+
}
8184

8285
// Drop the database if it exists
8386
dropQuery := fmt.Sprintf("DROP DATABASE IF EXISTS %s", dbName)

0 commit comments

Comments
 (0)