From c52591e4e7f7dc30d012a57a0aa360ffd8be0cd7 Mon Sep 17 00:00:00 2001 From: Karan Kajla Date: Wed, 7 Aug 2024 10:10:36 -0700 Subject: [PATCH] Use the correct arg to get the specified context in the FGA query command --- internal/cmd/fga.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cmd/fga.go b/internal/cmd/fga.go index 5140e7d..5ce9e1a 100644 --- a/internal/cmd/fga.go +++ b/internal/cmd/fga.go @@ -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]) } }