Skip to content

Commit

Permalink
process command now correctly errors out on printurl
Browse files Browse the repository at this point in the history
we were just hanging

Fixes: 359
  • Loading branch information
synfinatic committed May 5, 2022
1 parent 961434b commit a3d4e14
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/process_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ package main
import (
"encoding/json"
"fmt"
"strings"

// log "github.com/sirupsen/logrus"
"github.com/synfinatic/aws-sso-cli/internal/utils"
Expand All @@ -39,8 +40,8 @@ type ProcessCmd struct {
func (cc *ProcessCmd) Run(ctx *RunContext) error {
var err error

if ctx.Settings.UrlAction == "print" {
return fmt.Errorf("Unsupported --url-action=print option")
if strings.Contains(ctx.Settings.UrlAction, "print") {
return fmt.Errorf("unsupported --url-action=print|printurl option")
}

role := ctx.Cli.Process.Role
Expand Down

0 comments on commit a3d4e14

Please sign in to comment.