Skip to content

Commit c10ecc4

Browse files
authored
Merge pull request #3605 from ActiveState/mitchell/dx-3174
Installing in non-interactive mode on Windows with admin should bypass the prompt.
2 parents d523079 + 97d2beb commit c10ecc4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/state-installer/installer.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ func (i *Installer) Install() (rerr error) {
6161
if i.Params.force {
6262
prompter.SetForce(true)
6363
}
64-
confirm, err := prompter.Confirm("", locale.T("installer_prompt_is_admin"), ptr.To(false), ptr.To(true))
64+
defaultChoice := i.Params.nonInteractive
65+
confirm, err := prompter.Confirm("", locale.T("installer_prompt_is_admin"), &defaultChoice, ptr.To(true))
6566
if err != nil {
6667
return errs.Wrap(err, "Not confirmed")
6768
}

0 commit comments

Comments
 (0)