cli icon indicating copy to clipboard operation
cli copied to clipboard

CLI unaware of project if you run it in a subdirectory instead of project root

Open ammmir opened this issue 3 years ago • 0 comments

Bug report

Describe the bug

Supabase CLI is unaware of a project configuration unless it is run from the directory containing the supabase directory.

To Reproduce

  1. supabase init
  2. supabase link --project-ref foo
  3. supabase secrets list works
  4. mkdir x
  5. cd x
  6. supabase secrets list fails:
Error: Cannot find supabase/config.toml in the current directory. Have you set up the project with supabase init?

Expected behavior

Every subcommand of should work as expected regardless of the current working directory of the process.

Potential solution

If supabase/config.toml isn't found in the current directory, walk up the parent directory tree until it's found, maybe with a depth limit.

System information

  • OS: macOS
  • Supabase CLI: 0.32.2

ammmir avatar Aug 04 '22 08:08 ammmir