From e1df119bf3abc786babbd9d5f5378afd4dd31bb0 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Wed, 11 Sep 2024 21:54:18 +0800 Subject: [PATCH] Fix issue with placing app bundle in product directory if an existing build is there Signed-off-by: Claudio Cambra --- admin/osx/mac-crafter/Sources/main.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/admin/osx/mac-crafter/Sources/main.swift b/admin/osx/mac-crafter/Sources/main.swift index d4d49d389c..25e1d824c5 100644 --- a/admin/osx/mac-crafter/Sources/main.swift +++ b/admin/osx/mac-crafter/Sources/main.swift @@ -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!")