diff options
| author | ruki <[email protected]> | 2025-08-26 22:38:36 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-08-26 22:38:36 +0800 |
| commit | b4c677d8ffccd0ceb6de43a51a6ccf296d9cb5e3 (patch) | |
| tree | 572ebf9dcbd4677d4c8b4bb97d302e28f0f3e3d7 | |
| parent | 72493a7ed90b01a730e1712971f7ab7d3105219e (diff) | |
improve download tips
| -rw-r--r-- | xmake/modules/private/action/require/impl/actions/download.lua | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/xmake/modules/private/action/require/impl/actions/download.lua b/xmake/modules/private/action/require/impl/actions/download.lua index 0dcb4bf98..979c17971 100644 --- a/xmake/modules/private/action/require/impl/actions/download.lua +++ b/xmake/modules/private/action/require/impl/actions/download.lua @@ -217,6 +217,12 @@ function _download(package, url, sourcedir, opt) -- we do not extract it if we download only it. if opt.download_only then + tty.erase_line_to_start().cr() + if cached then + cprint("${yellow} => ${clear}download %s .. ${color.success}cached", url) + else + cprint("${yellow} => ${clear}download %s .. ${color.success}${text.success}", url) + end return end @@ -440,15 +446,6 @@ function main(package, opt) } if ok then - -- download only packages, we need not to install it, so we need flush console output - 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()) - else - cprint("${yellow} => ${clear}download %s .. ${color.success}${text.success}", url) - end - end break end end |
