Skip to content

Commit

Permalink
Server reports "OK", not "ok"
Browse files Browse the repository at this point in the history
  • Loading branch information
danielamkaer committed Mar 12, 2020
1 parent 450e51a commit 2eb2092
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/profiles_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func collectProfileInfo(cmd *cobra.Command) (*login, error) {
continue
}

if status.Status != "ok" {
if status.Status != "OK" {
cmd.Println(prompt.Colorize("[[red]Failed[reset]]"))
cmd.Println(fmt.Errorf("The server reported that is is malfunctioning, status: %s", status.Status))
os.Exit(1)
Expand Down
4 changes: 2 additions & 2 deletions cmd/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ func newStatusCmd() *cobra.Command {
}

func formatStatusText(statusText string) string {
if statusText == "ok" {
return prompt.Colorize("[green]ok[reset]")
if statusText == "OK" {
return prompt.Colorize("[green]OK[reset]")
}
return prompt.Colorize(fmt.Sprintf("[red]%s[reset]", statusText))
}

0 comments on commit 2eb2092

Please sign in to comment.