diff --git a/pkg/config/config.go b/pkg/config/config.go index 8914dcac0..f6329f459 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -601,6 +601,7 @@ func (c *config) loadFromEnv() error { return errors.Errorf("failed to decode env: %w", err) } v := viper.New() + v.SetEnvPrefix("SUPABASE") v.SetEnvKeyReplacer(strings.NewReplacer(".", "_")) v.AutomaticEnv() if err := v.MergeConfigMap(envKeysMap); err != nil { diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index bef3df123..c10669350 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -343,8 +343,8 @@ func TestLoadSeedPaths(t *testing.T) { } func TestLoadEnv(t *testing.T) { - t.Setenv("AUTH_JWT_SECRET", "test-secret") - t.Setenv("DB_ROOT_KEY", "test-root-key") + t.Setenv("SUPABASE_AUTH_JWT_SECRET", "test-secret") + t.Setenv("SUPABASE_DB_ROOT_KEY", "test-root-key") config := NewConfig() // Run test err := config.loadFromEnv()