diff options
| author | ruki <[email protected]> | 2024-05-09 00:30:36 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-05-09 00:30:36 +0800 |
| commit | a450b51f4403ef5af00a2128b19c04ee9672d7e0 (patch) | |
| tree | 75d17fe90cb671e6dddef0b2727c58466279a0c5 | |
| parent | efc618fb9c1156b49bb72dee04b0581e9e7debc8 (diff) | |
improve opt
| -rw-r--r-- | xmake/modules/private/action/require/impl/actions/download.lua | 10 | ||||
| -rw-r--r-- | xmake/modules/private/action/require/impl/download_packages.lua | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/xmake/modules/private/action/require/impl/actions/download.lua b/xmake/modules/private/action/require/impl/actions/download.lua index 8f57e14fb..c7d3438a5 100644 --- a/xmake/modules/private/action/require/impl/actions/download.lua +++ b/xmake/modules/private/action/require/impl/actions/download.lua @@ -207,8 +207,8 @@ function _download(package, url, sourcedir, opt) end end - -- we do not extract it - if opt.extract == false then + -- we do not extract it if we download only it. + if opt.download_only then return end @@ -340,7 +340,7 @@ function main(package, opt) local script = package:script("download") if script then _download_from_script(package, script, { - extract = opt.extract, + download_only = opt.download_only, sourcedir = sourcedir, url = url, url_alias = url_alias, @@ -352,7 +352,7 @@ function main(package, opt) url_submodules = url_submodules}) else _download(package, url, sourcedir, { - extract = opt.extract, + download_only = opt.download_only, url_alias = url_alias, url_excludes = url_excludes, url_http_headers = url_http_headers}) @@ -416,7 +416,7 @@ function main(package, opt) if ok then -- download only packages, we need not to install it, so we need flush console output - if opt.extract == false then + if opt.download_only then tty.erase_line_to_start().cr() if git.checkurl(url) then cprint("${yellow} => ${clear}clone %s %s .. ${color.success}${text.success}", url, package:version_str()) diff --git a/xmake/modules/private/action/require/impl/download_packages.lua b/xmake/modules/private/action/require/impl/download_packages.lua index 969ac84cb..e86d3f50b 100644 --- a/xmake/modules/private/action/require/impl/download_packages.lua +++ b/xmake/modules/private/action/require/impl/download_packages.lua @@ -147,7 +147,7 @@ function _download_packages(packages_download) packages_downloading[index] = instance -- download this package - action_download(instance, {outputdir = option.get("packagedir"), extract = false}) + action_download(instance, {outputdir = option.get("packagedir"), download_only = true}) -- reset package status cache _g.package_status_cache = nil |
