summaryrefslogtreecommitdiff
path: root/xmake/modules/private/action/require/impl/actions/install.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2021-09-25 21:57:16 +0800
committerruki <[email protected]>2021-09-25 21:57:16 +0800
commit697d7cc20e1e2914e72e396cf3158d9893a04e66 (patch)
tree37aa610373d521a5768ab53bf8fe8f5bd925724f /xmake/modules/private/action/require/impl/actions/install.lua
parent50eeea59ecee08e93e2c69929d12fa6953b92855 (diff)
improve error tips for package
Diffstat (limited to 'xmake/modules/private/action/require/impl/actions/install.lua')
-rw-r--r--xmake/modules/private/action/require/impl/actions/install.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/xmake/modules/private/action/require/impl/actions/install.lua b/xmake/modules/private/action/require/impl/actions/install.lua
index 8e8d92d39..9dcbc537b 100644
--- a/xmake/modules/private/action/require/impl/actions/install.lua
+++ b/xmake/modules/private/action/require/impl/actions/install.lua
@@ -278,7 +278,16 @@ function main(package)
-- failed
if not package:requireinfo().optional then
if os.isfile(errorfile) then
- print("if you want to get verbose errors, please see:")
+ if errors then
+ print("")
+ for idx, line in ipairs(errors:split("\n")) do
+ print(line)
+ if idx > 16 then
+ break
+ end
+ end
+ end
+ cprint("if you want to get more verbose errors, please see:")
cprint(" -> ${bright}%s", errorfile)
end
raise("install failed!")