summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-09-01 23:39:39 +0800
committerruki <[email protected]>2023-09-01 23:39:39 +0800
commit2adab158721b9436e7e843fb26798490e183c66f (patch)
tree16aff47cd59441403cbdb61dbc333999b3be8c3e
parent17caad10c82710499126fab573f0df6f884bb219 (diff)
fix error msg
-rw-r--r--xmake/actions/package/oldpkg/main.lua6
-rw-r--r--xmake/actions/package/remote/main.lua6
2 files changed, 8 insertions, 4 deletions
diff --git a/xmake/actions/package/oldpkg/main.lua b/xmake/actions/package/oldpkg/main.lua
index 4c75e9261..10b902491 100644
--- a/xmake/actions/package/oldpkg/main.lua
+++ b/xmake/actions/package/oldpkg/main.lua
@@ -98,8 +98,10 @@ function _do_package_target(target)
, headeronly = _package_library
}
local kind = target:kind()
- assert(scripts[kind], "this target(%s) with kind(%s) can not be packaged!", target:name(), kind)
- scripts[kind](target)
+ local script = scripts[kind]
+ if script then
+ script(target)
+ end
end
end
diff --git a/xmake/actions/package/remote/main.lua b/xmake/actions/package/remote/main.lua
index d66d53cba..91c859fb9 100644
--- a/xmake/actions/package/remote/main.lua
+++ b/xmake/actions/package/remote/main.lua
@@ -105,8 +105,10 @@ function _package_target(target)
, headeronly = _package_remote
}
local kind = target:kind()
- assert(scripts[kind], "this target(%s) with kind(%s) can not be packaged!", target:name(), kind)
- scripts[kind](target)
+ local script = scripts[kind]
+ if script then
+ script(target)
+ end
end
end