diff options
| author | ruki <[email protected]> | 2020-10-25 21:33:37 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-10-25 21:33:37 +0800 |
| commit | 627995a780821397db57702b6028f624b5aa3b58 (patch) | |
| tree | 3d0b53702ab8f56a203f7baa142a37ceaa625cbb | |
| parent | 4f11f7dc3c168501d2a415bebe568bf0e176f60a (diff) | |
fix fetch for xrepo
| -rw-r--r-- | xmake/actions/require/fetch.lua | 10 | ||||
| -rw-r--r-- | xmake/modules/private/xrepo/action/env.lua | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/xmake/actions/require/fetch.lua b/xmake/actions/require/fetch.lua index 87a907916..d4e1a4182 100644 --- a/xmake/actions/require/fetch.lua +++ b/xmake/actions/require/fetch.lua @@ -47,13 +47,9 @@ function main(requires_raw) -- fetch all packages local fetchinfos = {} - for _, instance in ipairs(package.load_packages(requires, {requires_extra = requires_extra, nodeps = true})) do - local fetchinfo - if fetchmodes and fetchmodes:has("deps") then - fetchinfo = instance:fetchdeps() - else - fetchinfo = instance:fetch() - end + local nodeps = not (fetchmodes and fetchmodes:has("deps")) + for _, instance in irpairs(package.load_packages(requires, {requires_extra = requires_extra, nodeps = nodeps})) do + local fetchinfo = instance:fetch() if fetchinfo then table.insert(fetchinfos, fetchinfo) end diff --git a/xmake/modules/private/xrepo/action/env.lua b/xmake/modules/private/xrepo/action/env.lua index 1068f1143..a36126c2c 100644 --- a/xmake/modules/private/xrepo/action/env.lua +++ b/xmake/modules/private/xrepo/action/env.lua @@ -20,6 +20,7 @@ -- imports import("core.base.option") +import("core.project.config") -- get menu options function menu_options() @@ -108,6 +109,9 @@ function _enter_project() table.insert(config_argv, kind) end os.vrunv("xmake", config_argv) + + -- load config + config.load() end -- get package environments |
