Skip to content

Commit

Permalink
Merge pull request #12 from workos/bug/useCorrectArgToGetContextForFg…
Browse files Browse the repository at this point in the history
…aQueryCommand

Use the correct arg to get the specified context in the `fga query` command
  • Loading branch information
kkajla12 authored Aug 7, 2024
2 parents 0f089f5 + c52591e commit 5d61376
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/cmd/fga.go
Original file line number Diff line number Diff line change
Expand Up @@ -559,9 +559,9 @@ var queryCmd = &cobra.Command{
}
var policyContext map[string]interface{}
if len(args) > 1 {
err := json.Unmarshal([]byte(args[3]), &policyContext)
err := json.Unmarshal([]byte(args[1]), &policyContext)
if err != nil {
return errors.Errorf("invalid context: %s", args[3])
return errors.Errorf("invalid context: %s", args[1])
}
}

Expand Down

0 comments on commit 5d61376

Please sign in to comment.