From 80993df87f30720d69c778e5009138907af98152 Mon Sep 17 00:00:00 2001 From: AbnormalPoof Date: Sun, 19 Oct 2025 16:16:00 -0500 Subject: [PATCH] Fix assets being cleared when running `lime run` --- project.hxp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/project.hxp b/project.hxp index 624287b8e..5f9130c35 100644 --- a/project.hxp +++ b/project.hxp @@ -1470,8 +1470,8 @@ class Project extends HXProject function clearAssets():Void { - // We don't want the haxe compilation server deleting our assets, do we? - if (isDisplay()) return; + // Don't run on non-build commands. + if (!isBuild()) return; var exportPath:Null = app.path ?? ""; @@ -1739,6 +1739,11 @@ class Project extends HXProject return this.command == "clean"; } + public function isBuild():Bool + { + return this.command == "test" || this.command == "build"; + } + public function isDebug():Bool { return this.debug;