hashicorp/packer

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

Open

#12,637 建立於 2023年9月27日

在 GitHub 查看
 (3 留言) (2 反應) (0 負責人)Go (3,228 fork)batch import
enhancementhelp wantedprovisioner/powershell

倉庫指標

Star
 (13,697 star)
PR 合併指標
 (平均合併 5天 6小時) (30 天內合併 9 個 PR)

描述

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

貢獻者指南