Skip to content

Commit

Permalink
improve to install package errors
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Dec 9, 2024
1 parent 46b9951 commit b5fa013
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions xmake/modules/private/action/require/impl/actions/install.lua
Original file line number Diff line number Diff line change
Expand Up @@ -542,17 +542,21 @@ function main(package)
-- failed
if not package:requireinfo().optional then
if os.isfile(errorfile) then
if errors then
print("")
for idx, line in ipairs(errors:split("\n")) do
print(line)
if idx > 16 then
break
if errors and option.get("diagnosis") then
print(tostring(errors))
else
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
cprint("if you want to get more verbose errors, please see:")
cprint(" -> ${bright}%s", errorfile)
end
raise("install failed!")
end
Expand Down

0 comments on commit b5fa013

Please sign in to comment.