Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 045145b commit 75ff540Copy full SHA for 75ff540
cmd/coder/login.go
@@ -4,6 +4,7 @@ import (
4
"net"
5
"net/http"
6
"net/url"
7
+ "strings"
8
"sync"
9
10
"github.com/pkg/browser"
@@ -22,13 +23,13 @@ type loginCmd struct {
22
23
func (cmd loginCmd) Spec() cli.CommandSpec {
24
return cli.CommandSpec{
25
Name: "login",
- Usage: "[Coder Enterprise URL]",
26
+ Usage: "[Coder Enterprise URL eg. http://my.coder.domain/ ]",
27
Desc: "authenticate this client for future operations",
28
}
29
30
func (cmd loginCmd) Run(fl *pflag.FlagSet) {
31
rawURL := fl.Arg(0)
- if rawURL == "" {
32
+ if rawURL == "" || !strings.HasPrefix(rawURL, "http") {
33
exitUsage(fl)
34
35
0 commit comments