summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/actions/require/impl/action/download.lua10
-rw-r--r--xmake/actions/require/impl/action/install.lua10
2 files changed, 14 insertions, 6 deletions
diff --git a/xmake/actions/require/impl/action/download.lua b/xmake/actions/require/impl/action/download.lua
index 9ce7ac026..36518b248 100644
--- a/xmake/actions/require/impl/action/download.lua
+++ b/xmake/actions/require/impl/action/download.lua
@@ -208,9 +208,13 @@ function main(package)
{
function (errors)
- -- verbose?
- if (option.get("verbose") or option.get("diagnosis")) and errors then
- cprint("${dim color.error}error: ${clear}%s", errors)
+ -- show or save the last errors
+ if errors then
+ if (option.get("verbose") or option.get("diagnosis")) then
+ cprint("${dim color.error}error: ${clear}%s", errors)
+ else
+ io.writefile(path.join(package:installdir("logs"), "download.txt"), errors)
+ end
end
-- trace
diff --git a/xmake/actions/require/impl/action/install.lua b/xmake/actions/require/impl/action/install.lua
index 2f4efed87..0fbac911c 100644
--- a/xmake/actions/require/impl/action/install.lua
+++ b/xmake/actions/require/impl/action/install.lua
@@ -225,9 +225,13 @@ function main(package)
{
function (errors)
- -- verbose?
- if (option.get("verbose") or option.get("diagnosis")) and errors then
- cprint("${dim color.error}error: ${clear}%s", errors)
+ -- show or save the last errors
+ if errors then
+ if (option.get("verbose") or option.get("diagnosis")) then
+ cprint("${dim color.error}error: ${clear}%s", errors)
+ else
+ io.writefile(path.join(package:installdir("logs"), "install.txt"), errors)
+ end
end
-- trace