planetscale / cli

The CLI for PlanetScale Database
https://planetscale.com/cli
Apache License 2.0
604 stars 51 forks source link

Fallback to current directory config file when no git repo #743

Closed mscoutermarsh closed 1 year ago

mscoutermarsh commented 1 year ago

Currently we only load in the .pscale.yml config if we are working within a git directory.

This is confusing when using pscale within a non-git directory because using the switch command will write a .pscale.yml file. But since we don't load it in, subsequent commands will not use it.

This PR adds a fallback & checks the current directory if git is not present.