Skip to content

Commit 716759a

Browse files
authored
fix: provide helpful error when no login url specified (#11110)
1 parent 167c759 commit 716759a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cli/login.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ func (r *RootCmd) login() *clibase.Cmd {
147147
rawURL = inv.Args[0]
148148
}
149149

150+
if rawURL == "" {
151+
return xerrors.Errorf("no url argument provided")
152+
}
153+
150154
if !strings.HasPrefix(rawURL, "http://") && !strings.HasPrefix(rawURL, "https://") {
151155
scheme := "https"
152156
if strings.HasPrefix(rawURL, "localhost") {

0 commit comments

Comments
 (0)