mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 11:43:02 +08:00
Use -NoProfile when calling powershell
This commit is contained in:
parent
49098fe55d
commit
e4d337cc96
@ -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()
|
Loading…
Reference in New Issue
Block a user