summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-02-28 12:16:50 +0800
committerruki <[email protected]>2021-02-28 12:16:50 +0800
commit4541f6292cc6cdedeac228efa1bb7abc76927f17 (patch)
tree4ef99b903da4ebf93a6343ae754815e07a7d25c8
parent06d15cea2ee275a82a4630147dc6aa9a33bbaf53 (diff)
improve fetch package
-rw-r--r--xmake/core/package/package.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index d5dc5a3b2..b798bbc10 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -1120,7 +1120,10 @@ function _instance:fetch(opt)
-- nil: find xmake or system packages
-- true: only find system package
-- false: only find xmake packages
- local system = opt.system or self:requireinfo().system
+ local system = opt.system
+ if system == nil then
+ system = self:requireinfo().system
+ end
if self:is3rd() then
-- we need ignore `{system = true/false}` argument if be 3rd package
-- @see https://github.com/xmake-io/xmake/issues/726