Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix xmake show issues #5170

Merged
merged 2 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion xmake/plugins/show/lists/architectures.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
import("core.project.project")
import("core.platform.platform")
import("core.base.text")
import("core.base.option")
import(".showlist")

-- show all platforms
function main()
Expand All @@ -35,6 +37,7 @@ function main()

-- get all architectures
local result = {align = 'l', sep = " "}
local json_result = {}
for i, plat in ipairs(plats) do
local archs = try {function () return project.allowed_archs(plat) end}
if archs then
Expand All @@ -45,7 +48,12 @@ function main()
end
if archs and #archs > 0 then
table.insert(result, table.join(plat, archs))
json_result[plat] = archs
end
end
print(text.table(result))
if option.get("json") then
showlist(json_result)
else
print(text.table(result))
end
end
2 changes: 1 addition & 1 deletion xmake/plugins/show/lists/packages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

-- imports
import("core.project.config")
import("require.list", {rootdir = path.join(os.programdir(), "actions"), alias = "show_packages"})
import("private.action.require.list", { alias = "show_packages" })
import(".showlist")

-- show all packages
Expand Down
Loading