Skip to content

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

@schwartzadev

Description

@schwartzadev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions