From d070fcb8348ee4ef3ca1f89302dd735248b1c706 Mon Sep 17 00:00:00 2001 From: Jason Lu Date: Mon, 25 May 2026 02:58:53 -0700 Subject: [PATCH] fix(macos/packaging): quote SHOULD_SIGN env expansion in install script The unquoted $ENV{SHOULD_SIGN} expansion in the install(CODE ...) block collapses to nothing when the env var is unset, leaving the if() with only "STREQUAL \"true\"" and failing with "Unknown arguments specified". Quoting the expansion makes the comparison safe whether SHOULD_SIGN is set, empty, or unset. --- cmake/packaging/macos.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/packaging/macos.cmake b/cmake/packaging/macos.cmake index b240f3838e8..623541043d1 100644 --- a/cmake/packaging/macos.cmake +++ b/cmake/packaging/macos.cmake @@ -60,7 +60,7 @@ else() endif() # SHOULD_SIGN is set only when publish_release is true or when manually building - if(\$ENV{SHOULD_SIGN} STREQUAL \"true\") + if(\"\$ENV{SHOULD_SIGN}\" STREQUAL \"true\") # Sign anything inside Contents/Frameworks set(_fw_dir \"\${_app}/Contents/Frameworks\") if(EXISTS \"\${_fw_dir}\")