summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShifftC <[email protected]>2025-02-08 15:25:58 +0100
committerShifftC <[email protected]>2025-02-08 16:19:47 +0100
commit640db3bf142689344a7f8c1a54371278ee7c96bc (patch)
tree436b10b906dcb7e492fc38039333a2a9c2686964
parentbffd31b6fd622eb806af28308047deca009d6c1c (diff)
Add target check to action clean
-rw-r--r--xmake/actions/clean/main.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/actions/clean/main.lua b/xmake/actions/clean/main.lua
index 0cc887651..cd581ee20 100644
--- a/xmake/actions/clean/main.lua
+++ b/xmake/actions/clean/main.lua
@@ -29,6 +29,7 @@ import("core.platform.platform")
import("private.action.clean.remove_files")
import("target.action.clean", {alias = "_do_clean_target"})
import("private.service.remote_build.action", {alias = "remote_build_action"})
+import("lib.detect.check_targetname")
-- on clean target
function _on_clean_target(target)
@@ -105,7 +106,7 @@ end
-- clean target
function _clean(targetname)
if targetname then
- local target = project.target(targetname)
+ local target = assert(check_targetname(targetname))
_clean_target(target)
else
_clean_targets(project.ordertargets())