From f6eb3f9b79816a6467228dad7a254d308cfcec5e Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Wed, 20 Nov 2024 16:10:27 +0800 Subject: [PATCH] Also escape codesign call with saving entitlements Signed-off-by: Claudio Cambra --- admin/osx/mac-crafter/Sources/Utils/Codesign.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/osx/mac-crafter/Sources/Utils/Codesign.swift b/admin/osx/mac-crafter/Sources/Utils/Codesign.swift index 4df74d68f..62ec0e2d8 100644 --- a/admin/osx/mac-crafter/Sources/Utils/Codesign.swift +++ b/admin/osx/mac-crafter/Sources/Utils/Codesign.swift @@ -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).") }