Skip to content

Commit

Permalink
Avoid error when powershell isn't found in path (#37188)
Browse files Browse the repository at this point in the history
Previously the REQUIRED flag made CMake fail with an error if
`powershell` wasn't found on line 193. This prevented the `else` block
on lines 197-198 from ever running.
  • Loading branch information
abram authored Mar 8, 2024
1 parent ca00cb2 commit 7502ccb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/buildsystems/vcpkg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ function(z_vcpkg_set_powershell_path)
set(Z_VCPKG_POWERSHELL_PATH "${Z_VCPKG_PWSH_PATH}" CACHE INTERNAL "The path to the PowerShell implementation to use.")
else()
message(DEBUG "vcpkg: Could not find PowerShell Core; falling back to PowerShell")
find_program(Z_VCPKG_BUILTIN_POWERSHELL_PATH powershell REQUIRED)
find_program(Z_VCPKG_BUILTIN_POWERSHELL_PATH powershell)
if(Z_VCPKG_BUILTIN_POWERSHELL_PATH)
set(Z_VCPKG_POWERSHELL_PATH "${Z_VCPKG_BUILTIN_POWERSHELL_PATH}" CACHE INTERNAL "The path to the PowerShell implementation to use.")
else()
Expand Down

0 comments on commit 7502ccb

Please sign in to comment.