Skip to content

Commit

Permalink
Installing in non-interactive mode on Windows with admin should bypas…
Browse files Browse the repository at this point in the history
…s the prompt.
  • Loading branch information
mitchell-as committed Nov 22, 2024
1 parent d2ec9cd commit 97d2beb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/state-installer/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit 97d2beb

Please sign in to comment.