File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 "fmt"
66 "io"
77 "net/url"
8+ "os"
89
910 "github.com/sourcegraph/src-cli/internal/api"
1011 "github.com/sourcegraph/src-cli/internal/clicompat"
@@ -42,10 +43,9 @@ var loginCommand = clicompat.Wrap(&cli.Command{
4243 HideVersion : true ,
4344 Flags : clicompat .WithAPIFlags (),
4445 Action : func (ctx context.Context , cmd * cli.Command ) error {
45- var loginEndpointURL * url.URL
4646 if cmd .Args ().Present () {
4747 arg := cmd .Args ().First ()
48- u , err := parseEndpoint (arg )
48+ loginEndpointURL , err := parseEndpoint (arg )
4949 if err != nil {
5050 return cmderrors .Usage (fmt .Sprintf ("invalid endpoint URL: %s" , arg ))
5151 }
@@ -76,13 +76,6 @@ var loginCommand = clicompat.Wrap(&cli.Command{
7676 out : os .Stdout ,
7777 apiFlags : apiFlags ,
7878 oauthClient : oauth .NewClient (oauth .DefaultClientID ),
79- return loginCmd (context .Background (), loginParams {
80- cfg : cfg ,
81- client : client ,
82- out : os .Stdout ,
83- apiFlags : apiFlags ,
84- oauthClient : oauth .NewClient (oauth .DefaultClientID ),
85- loginEndpointURL : loginEndpointURL ,
8679 })
8780 },
8881})
You can’t perform that action at this time.
0 commit comments