Skip to content

Commit

Permalink
fix: handle expo env vars in bootstrap. (#2118)
Browse files Browse the repository at this point in the history
  • Loading branch information
thorwebdev authored Apr 4, 2024
2 parents aed2f94 + 59b6194 commit 9319750
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ const (
POSTGRES_DATABASE = "POSTGRES_DATABASE"
NEXT_PUBLIC_SUPABASE_ANON_KEY = "NEXT_PUBLIC_SUPABASE_ANON_KEY"
NEXT_PUBLIC_SUPABASE_URL = "NEXT_PUBLIC_SUPABASE_URL"
EXPO_PUBLIC_SUPABASE_ANON_KEY = "EXPO_PUBLIC_SUPABASE_ANON_KEY"
EXPO_PUBLIC_SUPABASE_URL = "EXPO_PUBLIC_SUPABASE_URL"
)

func writeDotEnv(keys []api.ApiKeyResponse, config pgconn.Config, fsys afero.Fs) error {
Expand Down Expand Up @@ -246,8 +248,12 @@ func writeDotEnv(keys []api.ApiKeyResponse, config pgconn.Config, fsys afero.Fs)
case POSTGRES_DATABASE:
initial[k] = config.Database
case NEXT_PUBLIC_SUPABASE_ANON_KEY:
fallthrough
case EXPO_PUBLIC_SUPABASE_ANON_KEY:
initial[k] = initial[SUPABASE_ANON_KEY]
case NEXT_PUBLIC_SUPABASE_URL:
fallthrough
case EXPO_PUBLIC_SUPABASE_URL:
initial[k] = initial[SUPABASE_URL]
default:
initial[k] = v
Expand Down

0 comments on commit 9319750

Please sign in to comment.