We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 86e2049 commit e1d76caCopy full SHA for e1d76ca
internal/cmd/root.go
@@ -4,6 +4,7 @@ import (
4
"errors"
5
"fmt"
6
"os"
7
+ "strings"
8
"time"
9
10
semver "github.com/hashicorp/go-version"
@@ -30,7 +31,20 @@ func Execute() {
30
31
var noMultipleTokenSourcesWarning bool
32
33
func requiresLogin(cmd *cobra.Command) bool {
- return cmd.Name() != "login" && cmd.Name() != "signup" && cmd.CommandPath() != "turso config set token" && cmd.CommandPath() != "turso update"
34
+ path := cmd.CommandPath()
35
+ allowlist := []string{
36
+ "turso auth login",
37
+ "turso auth signup",
38
+ "turso config set token",
39
+ "turso update",
40
+ "turso completion",
41
+ }
42
+ for _, allowed := range allowlist {
43
+ if strings.HasPrefix(path, allowed) {
44
+ return false
45
46
47
+ return true
48
}
49
50
func init() {
0 commit comments