From 640db3bf142689344a7f8c1a54371278ee7c96bc Mon Sep 17 00:00:00 2001 From: ShifftC Date: Sat, 8 Feb 2025 15:25:58 +0100 Subject: Add target check to action clean --- xmake/actions/clean/main.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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()) -- cgit v1.3.1