1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix for creating temp dir with older powershell versions.

This commit is contained in:
Chris Church 2014-06-18 16:33:01 -05:00 committed by Matt Martz
parent 7631c005ca
commit 61c236be9e

View file

@ -81,7 +81,7 @@ class ShellModule(object):
def mkdtemp(self, basefile, system=False, mode=None):
basefile = _escape(basefile)
# FIXME: Support system temp path!
return _encode_script('''(New-Item -Type Directory -Path $env:temp -Name "%s").FullName;''' % basefile)
return _encode_script('''(New-Item -Type Directory -Path $env:temp -Name "%s").FullName | Write-Host -Separator '';''' % basefile)
def md5(self, path):
path = _escape(path)