feat(cli): make url optional for login command (#10925) (#12466)

Allow `coder login` to log into existing deployment if available.

Update help and error messages to indicate that `coder login` is
available as a command.

Fixes #10925
Fixes #9551
This commit is contained in:
elasticspoon
2024-03-11 10:14:19 -04:00
committed by GitHub
parent bed61f7d2a
commit 773862a9f5
6 changed files with 75 additions and 7 deletions

View File

@ -119,7 +119,7 @@ func TestLogout(t *testing.T) {
go func() {
defer close(logoutChan)
err = logout.Run()
assert.ErrorContains(t, err, "You are not logged in. Try logging in using 'coder login <url>'.")
assert.ErrorContains(t, err, "You are not logged in. Try logging in using 'coder login'.")
}()
<-logoutChan