aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-03-15 16:24:45 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2017-03-15 16:25:06 -0700
commite4d337cc96bb7d0f1153b1240d90518222b321ee (patch)
tree45329f9146f26905cab171b3a9c1dfced61bf3bb /scripts
parent49098fe55ddc82d5a66af1f175960d5165b0712d (diff)
downloadvcpkg-e4d337cc96bb7d0f1153b1240d90518222b321ee.tar.gz
vcpkg-e4d337cc96bb7d0f1153b1240d90518222b321ee.zip
Use -NoProfile when calling powershell
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/vcpkg_get_windows_sdk.cmake3
1 files changed, 1 insertions, 2 deletions
diff --git a/scripts/cmake/vcpkg_get_windows_sdk.cmake b/scripts/cmake/vcpkg_get_windows_sdk.cmake
index f522ae5a3..cefe8cfd8 100644
--- a/scripts/cmake/vcpkg_get_windows_sdk.cmake
+++ b/scripts/cmake/vcpkg_get_windows_sdk.cmake
@@ -1,6 +1,6 @@
function(vcpkg_get_windows_sdk ret)
execute_process(
- COMMAND powershell.exe -ExecutionPolicy Bypass "& {& '${VCPKG_ROOT_DIR}/scripts/getWindowsSDK.ps1'}"
+ COMMAND powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "& {& '${VCPKG_ROOT_DIR}/scripts/getWindowsSDK.ps1'}" 2>&1
OUTPUT_VARIABLE WINDOWS_SDK
RESULT_VARIABLE error_code)
@@ -10,6 +10,5 @@ function(vcpkg_get_windows_sdk ret)
# Remove trailing newline
string(REGEX REPLACE "\n$" "" WINDOWS_SDK "${WINDOWS_SDK}")
-
set(${ret} ${WINDOWS_SDK} PARENT_SCOPE)
endfunction() \ No newline at end of file