aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Zhu <john_zhu@acl.com>2019-06-25 21:45:02 -0700
committerRobert Schumacher <roschuma@microsoft.com>2019-06-25 21:45:02 -0700
commit32ee6c96ce48beffd64fea04c676ffb0d297681b (patch)
tree6c592c2640a47df90c379bd9c876b3027db6b29a
parentabb7f546defc5c66f0a89523d81f474a05fd8446 (diff)
downloadvcpkg-32ee6c96ce48beffd64fea04c676ffb0d297681b.tar.gz
vcpkg-32ee6c96ce48beffd64fea04c676ffb0d297681b.zip
#5248 make vcpkg buildable as 'system' user (#7038)
If we keep TMP, when run as 'system' user it is using Windows\Temp folder.
-rw-r--r--scripts/cleanEnvironmentHelper.ps12
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/cleanEnvironmentHelper.ps1 b/scripts/cleanEnvironmentHelper.ps1
index a3792ecd3..fa5fe869d 100644
--- a/scripts/cleanEnvironmentHelper.ps1
+++ b/scripts/cleanEnvironmentHelper.ps1
@@ -1,6 +1,6 @@
# Capture environment variables for the System and User. Also add some special/built-in variables.
# These will be used to synthesize a clean environment
-$specialEnvironmentMap = @{ "SystemDrive"=$env:SystemDrive; "SystemRoot"=$env:SystemRoot; "UserProfile"=$env:UserProfile } # These are built-in and not set in the registry
+$specialEnvironmentMap = @{ "SystemDrive"=$env:SystemDrive; "SystemRoot"=$env:SystemRoot; "UserProfile"=$env:UserProfile; "TMP"=$env:TMP } # These are built-in and not set in the registry
$machineEnvironmentMap = [Environment]::GetEnvironmentVariables('Machine') # HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
$userEnvironmentMap = [Environment]::GetEnvironmentVariables('User') # HKEY_CURRENT_USER\Environment