From 4ab918d4253414bb81316a61900cb4dd74399c43 Mon Sep 17 00:00:00 2001 From: Nick Hale <4175918+njhale@users.noreply.github.com> Date: Mon, 1 Jul 2024 19:20:48 -0400 Subject: [PATCH] fix: option hiding in cred subcommands The credential subcommands throw a nil ptr exception due to a nil credential override flag value. Prevent this by including the value when hiding flags from credential subcommands. Signed-off-by: Nick Hale <4175918+njhale@users.noreply.github.com> --- pkg/cli/gptscript.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/cli/gptscript.go b/pkg/cli/gptscript.go index 19a6b2f2..0281cd04 100644 --- a/pkg/cli/gptscript.go +++ b/pkg/cli/gptscript.go @@ -109,6 +109,7 @@ func New() *cobra.Command { newFlag := pflag.Flag{ Name: f.Name, Usage: f.Usage, + Value: f.Value, } if f.Name != "credential-context" {