-
Notifications
You must be signed in to change notification settings - Fork 317
Closed
Description
Describe the bug
The env() function to load environment variables into the config.toml does not work for arrays in the config.toml.
To Reproduce
Steps to reproduce the behavior:
- Add this to the project
config.toml
[db.seed]
enabled = true
sql_paths = [
"env(SEEDS_PATH)"
]
- Run
SEEDS_PATH=abc123 supabase db reset - Observe
No seed files matched pattern: supabase/env(SEEDS_PATH)in the console output. This is the first line in the output.
Expected behavior
Supabase uses the path in the environment variable to source database seeds.
System information
Rerun the failing command with --create-ticket flag.
- Ticket ID: This does not output from running
SEEDS_PATH=abc123 supabase db reset --create-ticket - Version of OS: Mac 14.4 (23E214)
- Version of CLI: 1.204.3
- Version of Docker: Docker version 27.2.0, build 3ab4256
- Versions of services:
SERVICE IMAGE │ LOCAL │ LINKED
─────────────────────────┼──────────────────┼─────────────
supabase/postgres │ 15.1.0.122 │ 15.1.0.122
supabase/gotrue │ v2.162.1 │ v2.162.1
postgrest/postgrest │ v11.2.0 │ v11.2.0
supabase/realtime │ v2.30.34 │ -
supabase/storage-api │ v1.11.7 │ v1.11.14
supabase/edge-runtime │ v1.58.12 │ -
supabase/studio │ 20240930-16f2b8e │ -
supabase/postgres-meta │ v0.83.2 │ -
supabase/logflare │ 1.4.0 │ -
supabase/supavisor │ 1.1.56 │ -
Additional context
I have tested this with a .env file as well, with no luck.
Related issues include:
- Support Integer in the config.toml via the "env()" function #1551
- Support boolean in Config.toml env substitution #1325
- Allow reading config values from .env file #278
- Config.toml env variable replacement fails #210
These issues are related but distinct -- as far as I can tell there is no issue for this array-specific bug.
Metadata
Metadata
Assignees
Labels
No labels