From 8d01462c80b29037ae86e864ebaeeec42bdbe9fa Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Thu, 21 Nov 2024 23:09:13 +0800 Subject: [PATCH] Ensure path passed to codesigning is absolute when using mac-crafter codesign Signed-off-by: Claudio Cambra --- admin/osx/mac-crafter/Sources/main.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/admin/osx/mac-crafter/Sources/main.swift b/admin/osx/mac-crafter/Sources/main.swift index d7e680a30..654954ec9 100644 --- a/admin/osx/mac-crafter/Sources/main.swift +++ b/admin/osx/mac-crafter/Sources/main.swift @@ -275,7 +275,10 @@ struct Codesign: ParsableCommand { var codeSignIdentity: String mutating func run() throws { - try codesignClientAppBundle(at: appBundlePath, withCodeSignIdentity: codeSignIdentity) + let absolutePath = appBundlePath.hasPrefix("/") + ? appBundlePath + : "\(FileManager.default.currentDirectoryPath)/\(appBundlePath)" + try codesignClientAppBundle(at: absolutePath, withCodeSignIdentity: codeSignIdentity) } } -- 2.30.2