Commit 5d9b0f16 by Brian Coca

Merge pull request #11890 from abarnas/stable-1.9

Fix powershell splatting leaving 'ExecutionPolicy Unrestricted' intact'
parents 2b909b4e 4f0adfb8
......@@ -22,7 +22,7 @@ import random
import shlex
import time
_common_args = ['PowerShell', '-NoProfile', '-NonInteractive']
_common_args = ['PowerShell', '-NoProfile', '-NonInteractive','-ExecutionPolicy', 'Unrestricted']
# Primarily for testing, allow explicitly specifying PowerShell version via
# an environment variable.
......@@ -57,7 +57,7 @@ def _build_file_cmd(cmd_parts, quote_args=True):
'''Build command line to run a file, given list of file name plus args.'''
if quote_args:
cmd_parts = ['"%s"' % x for x in cmd_parts]
return ' '.join(_common_args + ['-ExecutionPolicy', 'Unrestricted', '-File'] + cmd_parts)
return ' '.join(['&'] + cmd_parts)
class ShellModule(object):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment