summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-05-09 00:01:03 +0800
committerruki <[email protected]>2024-05-09 00:01:03 +0800
commitee0a59c41d830cd6f2765269598175198aa19520 (patch)
tree7e6c60d0bf199bbb81bd1e7220e11a03501813b9
parent323fc716301c0d78245e77c4dd227e29ba76a8e3 (diff)
improve output
-rw-r--r--xmake/modules/private/action/require/impl/actions/download.lua14
-rw-r--r--xmake/modules/private/action/require/impl/download_packages.lua2
2 files changed, 14 insertions, 2 deletions
diff --git a/xmake/modules/private/action/require/impl/actions/download.lua b/xmake/modules/private/action/require/impl/actions/download.lua
index 203f0c5b8..8f57e14fb 100644
--- a/xmake/modules/private/action/require/impl/actions/download.lua
+++ b/xmake/modules/private/action/require/impl/actions/download.lua
@@ -414,8 +414,18 @@ function main(package, opt)
}
}
- -- ok? break it
- if ok then break end
+ if ok then
+ -- download only packages, we need not to install it, so we need flush console output
+ if opt.extract == false 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
-- unlock this package
diff --git a/xmake/modules/private/action/require/impl/download_packages.lua b/xmake/modules/private/action/require/impl/download_packages.lua
index ff30ae390..969ac84cb 100644
--- a/xmake/modules/private/action/require/impl/download_packages.lua
+++ b/xmake/modules/private/action/require/impl/download_packages.lua
@@ -297,6 +297,8 @@ function main(requires, opt)
-- download all required packages from repositories
_download_packages(packages_download)
+ cprint("outputdir: ${bright}%s", option.get("packagedir"))
+ cprint("${color.success}install packages ok")
return packages
end