diff options
| author | ShifftC <[email protected]> | 2025-02-08 15:57:25 +0100 |
|---|---|---|
| committer | ShifftC <[email protected]> | 2025-02-08 16:19:47 +0100 |
| commit | 4183bbfd1c2206c28b70647d9f37691dcc953050 (patch) | |
| tree | bc1ae2acc205f5b877f170f714c2e8c901e26602 | |
| parent | 482faf836ebbc8ff01dbf2f7f6743c25a66ee26f (diff) | |
Add target check to action package
| -rw-r--r-- | xmake/actions/package/local/main.lua | 3 | ||||
| -rw-r--r-- | xmake/actions/package/oldpkg/main.lua | 3 | ||||
| -rw-r--r-- | xmake/actions/package/remote/main.lua | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/xmake/actions/package/local/main.lua b/xmake/actions/package/local/main.lua index 3035946ff..547fc3438 100644 --- a/xmake/actions/package/local/main.lua +++ b/xmake/actions/package/local/main.lua @@ -25,6 +25,7 @@ import("core.project.rule") import("core.project.config") import("core.project.project") import("target.action.install") +import("lib.detect.check_targetname") -- get library deps function _get_librarydeps(target) @@ -230,7 +231,7 @@ function main() -- package the given target? if targetname then - local target = project.target(targetname) + local target = assert(check_targetname(targetname)) _package_targets(target:orderdeps()) _package_target(target) else diff --git a/xmake/actions/package/oldpkg/main.lua b/xmake/actions/package/oldpkg/main.lua index 10b902491..d5df0e19f 100644 --- a/xmake/actions/package/oldpkg/main.lua +++ b/xmake/actions/package/oldpkg/main.lua @@ -24,6 +24,7 @@ import("core.base.task") import("core.project.rule") import("core.project.config") import("core.project.project") +import("lib.detect.check_targetname") -- package library function _package_library(target) @@ -193,7 +194,7 @@ function main() -- package the given target? if targetname then - local target = project.target(targetname) + local target = assert(check_targetname(targetname)) _package_targets(target:orderdeps()) _package_target(target) else diff --git a/xmake/actions/package/remote/main.lua b/xmake/actions/package/remote/main.lua index 58c89b302..8bfe1258c 100644 --- a/xmake/actions/package/remote/main.lua +++ b/xmake/actions/package/remote/main.lua @@ -25,6 +25,7 @@ import("core.project.rule") import("core.project.config") import("core.project.project") import("core.base.bit") +import("lib.detect.check_targetname") -- get library deps function _get_librarydeps(target) @@ -153,7 +154,7 @@ function main() -- package the given target? local targetname = option.get("target") if targetname then - local target = project.target(targetname) + local target = assert(check_targetname(targetname)) _package_targets(target:orderdeps()) _package_target(target) else |
