From 97d2beb536d5c5297507a81e87d2b3aa90394308 Mon Sep 17 00:00:00 2001 From: mitchell Date: Fri, 22 Nov 2024 10:52:10 -0500 Subject: [PATCH] Installing in non-interactive mode on Windows with admin should bypass the prompt. --- cmd/state-installer/installer.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/state-installer/installer.go b/cmd/state-installer/installer.go index 7d168697e5..3a4bc67049 100644 --- a/cmd/state-installer/installer.go +++ b/cmd/state-installer/installer.go @@ -61,7 +61,8 @@ func (i *Installer) Install() (rerr error) { if i.Params.force { prompter.SetForce(true) } - confirm, err := prompter.Confirm("", locale.T("installer_prompt_is_admin"), ptr.To(false), ptr.To(true)) + defaultChoice := i.Params.nonInteractive + confirm, err := prompter.Confirm("", locale.T("installer_prompt_is_admin"), &defaultChoice, ptr.To(true)) if err != nil { return errs.Wrap(err, "Not confirmed") }