Ensure paths are passed properly escaped into codesign command in mac-crafter

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2024-11-20 12:12:21 +08:00
parent b046f500fc
commit 533b04baf9

View file

@ -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).")
}