Skip to content

Commit

Permalink
chore: emit supabase url in .env
Browse files Browse the repository at this point in the history
  • Loading branch information
sweatybridge committed Mar 22, 2024
1 parent 488be6b commit 985d609
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,12 @@ func promptLogin(ctx context.Context, fsys afero.Fs) (err error) {
func writeDotEnv(keys []api.ApiKeyResponse, config pgconn.Config, fsys afero.Fs) error {
// Write to .env file
mapvalue := map[string]string{
"SUPABASE_URL": utils.GetSupabaseHost(flags.ProjectRef),
"SUPABASE_DB_URL": utils.ToPostgresURL(config),
}
for _, entry := range keys {
key := fmt.Sprintf("SUPABASE_%s_KEY", strings.ToUpper(entry.Name))
name := strings.ToUpper(entry.Name)
key := fmt.Sprintf("SUPABASE_%s_KEY", name)
mapvalue[key] = entry.ApiKey
}
out, err := godotenv.Marshal(mapvalue)
Expand Down

0 comments on commit 985d609

Please sign in to comment.