Fix issue with placing app bundle in product directory if an existing build is there

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2024-09-11 21:54:18 +08:00
parent 8c7ac5a92d
commit e1df119bf3
No known key found for this signature in database
GPG key ID: C839200C384636B0

View file

@ -209,6 +209,9 @@ struct MacCrafter: ParsableCommand {
atPath: productPath, withIntermediateDirectories: true, attributes: nil
)
}
if fm.fileExists(atPath: "\(productPath)/\(appName).app") {
try fm.removeItem(atPath: "\(productPath)/\(appName).app")
}
try fm.copyItem(atPath: clientAppDir, toPath: "\(productPath)/\(appName).app")
print("Done!")