fix: provide helpful error when no login url specified (#11110)

This commit is contained in:
Garrett Delfosse
2023-12-08 14:44:40 -05:00
committed by GitHub
parent 167c759149
commit 716759aacf
+4
View File
@@ -147,6 +147,10 @@ func (r *RootCmd) login() *clibase.Cmd {
rawURL = inv.Args[0]
}
if rawURL == "" {
return xerrors.Errorf("no url argument provided")
}
if !strings.HasPrefix(rawURL, "http://") && !strings.HasPrefix(rawURL, "https://") {
scheme := "https"
if strings.HasPrefix(rawURL, "localhost") {