contrib/automation/hgautomation/aws.py
branchstable
changeset 43411 a77338d2bdab
parent 43234 c09e8ac3f61f
child 43823 3d53f9cc73ab
--- a/contrib/automation/hgautomation/aws.py	Mon Nov 04 20:33:38 2019 -0800
+++ b/contrib/automation/hgautomation/aws.py	Thu Oct 17 16:46:13 2019 -0400
@@ -191,6 +191,10 @@
 $Setting = 'LocalAccountTokenFilterPolicy'
 Set-ItemProperty -Path $Key -Name $Setting -Value 1 -Force
 
+# Avoid long usernames in the temp directory path because the '~' causes extra quoting in ssh output
+[System.Environment]::SetEnvironmentVariable('TMP', 'C:\Temp', [System.EnvironmentVariableTarget]::User)
+[System.Environment]::SetEnvironmentVariable('TEMP', 'C:\Temp', [System.EnvironmentVariableTarget]::User)
+
 # Configure and restart the WinRM Service; Enable the required firewall exception
 Stop-Service -Name WinRM
 Set-Service -Name WinRM -StartupType Automatic