mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 19:09:00 +08:00
Avoid error when powershell isn't found in path (#37188)
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.
This commit is contained in:
parent
ca00cb2cbf
commit
7502ccb84c
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user