mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #25299 from twangboy/fix_13943
Added -NonInteractive so powershell doesn't hang waiting for input
This commit is contained in:
commit
219d4cad9c
1 changed files with 2 additions and 2 deletions
|
@ -237,9 +237,9 @@ def _run(cmd,
|
|||
# The last item in the list [-1] is the current method.
|
||||
# The third item[2] in each tuple is the name of that method.
|
||||
if stack[-2][2] == 'script':
|
||||
cmd = 'Powershell -executionpolicy bypass -File ' + cmd
|
||||
cmd = 'Powershell -NonInteractive -ExecutionPolicy Bypass -File ' + cmd
|
||||
else:
|
||||
cmd = 'Powershell "{0}"'.format(cmd.replace('"', '\\"'))
|
||||
cmd = 'Powershell -NonInteractive "{0}"'.format(cmd.replace('"', '\\"'))
|
||||
|
||||
# munge the cmd and cwd through the template
|
||||
(cmd, cwd) = _render_cmd(cmd, cwd, template, saltenv)
|
||||
|
|
Loading…
Add table
Reference in a new issue