Skip to content

Commit

Permalink
fix: use base config when no remote is declared (#2882)
Browse files Browse the repository at this point in the history
  • Loading branch information
sweatybridge authored Nov 14, 2024
1 parent bc42076 commit 65d8be4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions internal/config/push/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ func Run(ctx context.Context, ref string, fsys afero.Fs) error {
return err
}
client := config.NewConfigUpdater(*utils.GetSupabase())
fmt.Fprintln(os.Stderr, "Pushing config to project:", ref)
remote, _ := utils.Config.GetRemoteByProjectRef(ref)
remote, err := utils.Config.GetRemoteByProjectRef(ref)
if err != nil {
// Use base config when no remote is declared
remote.ProjectId = ref
}
fmt.Fprintln(os.Stderr, "Pushing config to project:", remote.ProjectId)
console := utils.NewConsole()
keep := func(name string) bool {
title := fmt.Sprintf("Do you want to push %s config to remote?", name)
Expand Down

0 comments on commit 65d8be4

Please sign in to comment.