diff options
| author | ruki <[email protected]> | 2021-05-27 00:31:18 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-05-27 00:31:18 +0800 |
| commit | 02d3e2cd9743435dc37a7b51ace4a638e7661a75 (patch) | |
| tree | 57ce97e5df41b580c208ed0decfb8e9457b01eb2 | |
| parent | 0ca4e376f45503c3c06e483ba4c0f71614ce9957 (diff) | |
improve to import packages
| -rw-r--r-- | xmake/actions/install/main.lua | 10 | ||||
| -rw-r--r-- | xmake/modules/private/action/require/import.lua | 14 |
2 files changed, 0 insertions, 24 deletions
diff --git a/xmake/actions/install/main.lua b/xmake/actions/install/main.lua index af0a30078..40ba15cc3 100644 --- a/xmake/actions/install/main.lua +++ b/xmake/actions/install/main.lua @@ -94,22 +94,14 @@ function main() local ok = try { function () - - -- install target install(targetname or (option.get("all") and "__all" or "__def")) - - -- trace cprint("${color.success}install ok!") - - -- ok return true end } -- release privilege privilege.store() - - -- ok? if ok then return end end @@ -119,8 +111,6 @@ function main() -- install target with administrator permission sudo.runl(path.join(os.scriptdir(), "install_admin.lua"), {targetname or (option.get("all") and "__all" or "__def"), option.get("installdir"), option.get("prefix")}) - - -- trace cprint("${color.success}install ok!") ok = true end diff --git a/xmake/modules/private/action/require/import.lua b/xmake/modules/private/action/require/import.lua index cf6cb85c7..43ac9a13a 100644 --- a/xmake/modules/private/action/require/import.lua +++ b/xmake/modules/private/action/require/import.lua @@ -19,24 +19,13 @@ -- -- imports -import("core.base.task") import("core.base.option") -import("private.action.require.impl.repository") -import("private.action.require.impl.environment") import("private.action.require.impl.import_packages") import("private.action.require.impl.utils.get_requires") -- import the given packages function main(requires_raw) - -- enter environment - environment.enter() - - -- pull all repositories first if not exists - if not repository.pulled() then - task.run("repo", {update = true}) - end - -- get requires and extra config local requires_extra = nil local requires, requires_extra = get_requires(requires_raw) @@ -61,8 +50,5 @@ function main(requires_raw) end end end - - -- leave environment - environment.leave() end |
