File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
admin/osx/mac-crafter/Sources/Commands Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -237,11 +237,14 @@ struct Build: AsyncParsableCommand {
237237 stopwatch. record ( " Desktop Client Crafting " )
238238
239239 if fullRebuild {
240- do {
241- try fm. removeItem ( atPath: clientBuildURL. path)
242- } catch let error {
243- print ( " ERROR: Error removing build directory: \( error) " )
244- throw MacCrafterError . craftError ( " Failed to remove existing build directory! " )
240+ if fm. fileExists ( atPath: clientBuildURL. path) {
241+ print ( " Removing existing client build directory at: \( clientBuildURL. path) " )
242+
243+ do {
244+ try fm. removeItem ( atPath: clientBuildURL. path)
245+ } catch let error {
246+ throw MacCrafterError . craftError ( " Failed to remove existing build directory at: \( clientBuildURL. path) " )
247+ }
245248 }
246249 } else {
247250 // HACK: When building the client we often run into issues with the shell integration
You can’t perform that action at this time.
0 commit comments