Closed CodingDoug closed 1 year ago
But this is shown to the user only once? See:
https://github.com/chiselstrike/turso-cli/blob/main/internal/cmd/auth.go#L164-L167
Isn't that good enough @CodingDoug ?
It was showed to me even though I had 5 databases, so it must only be a local flag right now. If that's the case, then when I use another machine, or reconfigure the same one, it will ask me again?
Edit: to be clear, I think it would be best to consult the API to figure out if the user has any databases, not a local cache.
The notification will be displayed when you use different machine or remove config file. It is just a local variable that stores the info. But checking for existing dbs has the same drawback. If you create 5 databases and then destroy all of them then you will see the notification anyway if we safeguard it with the check for existing db.
I'm fine with that, because creating a database is still the next logical step after signing in without any databases present (there is no other task to accomplish using the CLI without a database). Even if they chose to go from >0 to 0 later.
This is great advice for first time users of the CLI, but possibly distressing for those who already have a database (they might be thinking: do I have to create another one one now?).