From 7502ccb84c179d9e7cc02bdae4be8b400ee7f40e Mon Sep 17 00:00:00 2001 From: Abe Fettig Date: Fri, 8 Mar 2024 01:40:36 -0500 Subject: [PATCH] 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. --- scripts/buildsystems/vcpkg.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index fdd82f07c1..94bc5d4b9d 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -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()