hashicorp/packer

The -NonInteractive Parameter should be added by default when starting a powershell shell

Open

#12.637 geöffnet am 27. Sept. 2023

Auf GitHub ansehen
 (3 Kommentare) (2 Reaktionen) (0 zugewiesene Personen)Go (3.228 Forks)batch import
enhancementhelp wantedprovisioner/powershell

Repository-Metriken

Stars
 (13.697 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 4T 23h) (11 gemergte PRs in 30 T)

Beschreibung

When a script called by the Powershell provisioner includes a command that involves a y/n prompt (or other kinds of interaction (e.g., Read-Host) the Powershell script will appear to hang as that script will wait indefinitely for the input. The -NonInteractive Parameter should be added by default when using the Powershell provisioner. This would result in an error instead of the apparent hanging when using commands requiring interactivity.

This can currently be worked around by specifying a custom execute_command, but it would be preferable to set the parameter by default.

Originally posted by @floh96 in https://github.com/hashicorp/packer/issues/4916#issuecomment-1239297541

Contributor Guide