Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

env() does not work in config.toml arrays #2774

Open
schwartzadev opened this issue Oct 16, 2024 · 1 comment
Open

env() does not work in config.toml arrays #2774

schwartzadev opened this issue Oct 16, 2024 · 1 comment

Comments

@schwartzadev
Copy link

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:

  1. Add this to the project config.toml
[db.seed]
enabled = true
sql_paths = [
    "env(SEEDS_PATH)"
]
  1. Run SEEDS_PATH=abc123 supabase db reset
  2. 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:

These issues are related but distinct -- as far as I can tell there is no issue for this array-specific bug.

@0reo
Copy link

0reo commented Oct 23, 2024

I've run into the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants