Update DiscordChatExporter.Gui/Publish-MacOSBundle.csx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Oleksii Holub 2026-03-23 20:55:11 +02:00 committed by GitHub
parent 420c0c5da8
commit 9672d162d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -39,6 +39,10 @@ public class PublishMacOSBundleCommand : ICommand
var tempDirPath = Path.GetFullPath( var tempDirPath = Path.GetFullPath(
Path.Combine(publishDirPath, "../publish-macos-app-temp") Path.Combine(publishDirPath, "../publish-macos-app-temp")
); );
// Ensure the temporary directory is clean before use in case a previous run crashed
if (Directory.Exists(tempDirPath))
Directory.Delete(tempDirPath, true);
var bundleDirPath = Path.Combine(tempDirPath, BundleName); var bundleDirPath = Path.Combine(tempDirPath, BundleName);
var contentsDirPath = Path.Combine(bundleDirPath, "Contents"); var contentsDirPath = Path.Combine(bundleDirPath, "Contents");