From 69769c1bef55fe8bc3a9eaeba5a17b313eb68c3d Mon Sep 17 00:00:00 2001 From: Fabrice de Gans Date: Sun, 10 Mar 2024 16:15:44 -0700 Subject: [PATCH] [CI] Use proper POWERSHELL variable casing The POWERSHELL cmake variable was sometimes used lowercase. --- CMakeLists.txt | 2 +- cmake/MakeReleaseCommitAndTag.cmake | 2 +- cmake/Set-Toolchain-vcpkg.cmake | 2 +- cmake/UpdateAppcast.cmake | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fc4c5055..74ca73e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,7 +58,7 @@ if(WIN32) HINTS "/Windows/System32/WindowsPowerShell/v1.0" REQUIRED) else() - find_program(powershell pwsh REQUIRED) + find_program(POWERSHELL pwsh REQUIRED) endif() include(Set-Toolchain-vcpkg) diff --git a/cmake/MakeReleaseCommitAndTag.cmake b/cmake/MakeReleaseCommitAndTag.cmake index 43cfc275..55e1190a 100644 --- a/cmake/MakeReleaseCommitAndTag.cmake +++ b/cmake/MakeReleaseCommitAndTag.cmake @@ -189,7 +189,7 @@ Ignore the following cmake error. if(CMAKE_HOST_SYSTEM MATCHES Windows OR ((NOT DEFINED CMAKE_HOST_SYSTEM) AND WIN32)) execute_process( - COMMAND powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command [=[ + COMMAND ${POWERSHELL} -NoLogo -NoProfile -ExecutionPolicy Bypass -Command [=[ $text = [IO.File]::ReadAllText("CHANGELOG.md.work") -replace "`r`n", "`n" [IO.File]::WriteAllText("CHANGELOG.md", $text) ]=] diff --git a/cmake/Set-Toolchain-vcpkg.cmake b/cmake/Set-Toolchain-vcpkg.cmake index 7b4bba14..02c259f8 100644 --- a/cmake/Set-Toolchain-vcpkg.cmake +++ b/cmake/Set-Toolchain-vcpkg.cmake @@ -319,7 +319,7 @@ function(get_binary_packages vcpkg_exe) # -command "import-module ($env:USERPROFILE + '/source/repos/vcpkg-binpkg-prototype/vcpkg-binpkg.psm1'); vcpkg-instpkg ." execute_process( - COMMAND ${powershell} + COMMAND ${POWERSHELL} -executionpolicy bypass -noprofile -command "import-module '${CMAKE_BINARY_DIR}/vcpkg-binpkg/vcpkg-binpkg.psm1'; vcpkg-instpkg ." WORKING_DIRECTORY ${bin_pkgs_dir} diff --git a/cmake/UpdateAppcast.cmake b/cmake/UpdateAppcast.cmake index 98a2675b..02c2c3bf 100644 --- a/cmake/UpdateAppcast.cmake +++ b/cmake/UpdateAppcast.cmake @@ -84,7 +84,7 @@ Ignore the following cmake error. if(CMAKE_HOST_SYSTEM MATCHES Windows OR ((NOT DEFINED CMAKE_HOST_SYSTEM) AND WIN32)) execute_process( - COMMAND powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command [=[ + COMMAND ${POWERSHELL} -NoLogo -NoProfile -ExecutionPolicy Bypass -Command [=[ $text = [IO.File]::ReadAllText("appcast.xml.work") -replace "`r`n", "`n" [IO.File]::WriteAllText("appcast.xml", $text) ]=]