mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: provide helpful error when no login url specified (#11110)
This commit is contained in:
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user