cli
cli copied to clipboard
CLI unaware of project if you run it in a subdirectory instead of project root
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
-
supabase init -
supabase link --project-ref foo -
supabase secrets listworks -
mkdir x -
cd x -
supabase secrets listfails:
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