Skip to content

Commit

Permalink
Fix login command for localhost environment
Browse files Browse the repository at this point in the history
  • Loading branch information
royroyee committed Oct 28, 2024
1 parent 2bc32a0 commit 395344f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ var loginCmd = &cobra.Command{
alpacon login
alpacon login [WORKSPACE_URL] -u [USERNAME] -p [PASSWORD]
alpacon login example.alpacon.io
alpacon login example.alpacon.io g
# Include http if using localhost.
alppacon login http://localhost:8000
# Login via API Token
alpacon login -w [WORKSPACE_URL] -t [TOKEN_KEY]
Expand All @@ -40,7 +43,7 @@ var loginCmd = &cobra.Command{
workspaceURL, username, password = promptForCredentials(workspaceURL, username, password)
}

if !strings.HasPrefix(workspaceURL, "https") {
if !strings.HasPrefix(workspaceURL, "http") {
workspaceURL = "https://" + workspaceURL
}

Expand Down

0 comments on commit 395344f

Please sign in to comment.