Skip to content

Commit

Permalink
fix: db reset with disabled services (#2663)
Browse files Browse the repository at this point in the history
* fix(db): reset command attempting to restart disabled services

Fixes #2658

* chore: cleanup debug log

* chore: test config declaration order

* chore: apply PR suggestions

* chore: remove unnecessary newline
  • Loading branch information
avallete authored Sep 9, 2024
1 parent de3fe90 commit 8a50b02
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions internal/db/reset/reset.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,13 @@ func Run(ctx context.Context, version string, config pgconn.Config, fsys afero.F
return err
}
// Seed objects from supabase/buckets directory
if err := start.WaitForHealthyService(ctx, 30*time.Second, utils.StorageId); err != nil {
return err
}
if err := buckets.Run(ctx, "", false, fsys); err != nil {
return err
if utils.Config.Storage.Enabled {
if err := start.WaitForHealthyService(ctx, 30*time.Second, utils.StorageId); err != nil {
return err
}
if err := buckets.Run(ctx, "", false, fsys); err != nil {
return err
}
}
branch := keys.GetGitBranch(fsys)
fmt.Fprintln(os.Stderr, "Finished "+utils.Aqua("supabase db reset")+" on branch "+utils.Aqua(branch)+".")
Expand Down

0 comments on commit 8a50b02

Please sign in to comment.