From 533b04baf9368aa7f2ff3be29076e4bf74dbd1d0 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Wed, 20 Nov 2024 12:12:21 +0800 Subject: [PATCH] Ensure paths are passed properly escaped into codesign command in mac-crafter 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 c72ca0d66ae2b..4df74d68f308a 100644 --- a/admin/osx/mac-crafter/Sources/Utils/Codesign.swift +++ b/admin/osx/mac-crafter/Sources/Utils/Codesign.swift @@ -36,7 +36,7 @@ func codesign( options: String = "--timestamp --force --preserve-metadata=entitlements --verbose=4 --options runtime --deep" ) throws { print("Code-signing \(path)...") - let command = "codesign -s \"\(identity)\" \(options) \(path)" + let command = "codesign -s \"\(identity)\" \(options) \"\(path)\"" guard shell(command) == 0 else { throw CodeSigningError.failedToCodeSign("Failed to code-sign \(path).") }