You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Hi @MBradbury thanks for opening up this request. You mentioned the workaround, which is is the first thing that came to mind. But I understand why folks would want that to be the default.
I've labelled the issue in case you or a member of the community is interested in adding the feature. We are prioritizing work on removing bundled plugins and improving HCL so we wont be able to work on it soon.
I'm not a Powershell user but I am curious if this is something that could be accomplished from within a user provided powershell script? Or if it has to be a flag on the powershell command?
Tought about clearing that quick fix, adding the -NonInteractive to the command does cause an error in case the command needs input, I was wondering if there is any test where we actually run commands trough powershell or we simply compare the command string?
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 #4916 (comment)
The text was updated successfully, but these errors were encountered: