Skip to content

Commit

Permalink
Only create product path's directory if it doesn't exist already
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra committed Aug 5, 2024
1 parent 9ef07a5 commit 39d58f4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions admin/osx/mac-crafter/Sources/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,12 @@ struct MacCrafter: ParsableCommand {
let clientAppDir = "\(clientBuildDir)/image-\(buildType)-master/\(appName).app"
try codesignClientAppBundle(at: clientAppDir, withCodeSignIdentity: codeSignIdentity)

print("Placing Nextcloud Desktop Client in product directory...")
try fm.createDirectory(atPath: productPath, withIntermediateDirectories: true, attributes: nil)
print("Placing Nextcloud Desktop Client in \(productPath)...")
if !fm.fileExists(atPath: productPath) {
try fm.createDirectory(
atPath: productPath, withIntermediateDirectories: true, attributes: nil
)
}
try fm.copyItem(atPath: clientAppDir, toPath: "\(productPath)/\(appName).app")

print("Done!")
Expand Down

0 comments on commit 39d58f4

Please sign in to comment.