Also escape codesign call with saving entitlements
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 20 Nov 2024 08:10:27 +0000 (16:10 +0800)
committerClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 20 Nov 2024 08:11:32 +0000 (16:11 +0800)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
admin/osx/mac-crafter/Sources/Utils/Codesign.swift

index 4df74d68f308a8dc6796986e2df620597198c1c8..62ec0e2d81f69acffd3152fc9bf09b0e72cc99fb 100644 (file)
@@ -57,7 +57,7 @@ func recursivelyCodesign(path: String, identity: String) throws {
 }
 
 func saveCodesignEntitlements(target: String, path: String) throws {
-    let command = "codesign -d --entitlements \(path) --xml \(target)"
+    let command = "codesign -d --entitlements \"\(path)\" --xml \"\(target)\""
     guard shell(command) == 0 else {
         throw CodeSigningError.failedToCodeSign("Failed to save entitlements for \(target).")
     }