Skip to content

Commit

Permalink
Merge pull request #122 from opcr-io/login_fix
Browse files Browse the repository at this point in the history
Error if no server provided on login
  • Loading branch information
carabasdaniel authored Feb 22, 2023
2 parents 2ab0782 + 1ad45d4 commit 0813c1e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/policy/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ func (c *LoginCmd) Run(g *Globals) error {
c.Password = strings.TrimSuffix(c.Password, "\r")
}

if c.Server == "" {
return errors.New("Must provide --server")
}

password := c.Password
if c.Password == "" {
g.App.UI.Normal().NoNewline().Msg("Password: ")
Expand Down

0 comments on commit 0813c1e

Please sign in to comment.