summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2026-04-20 22:37:26 +0800
committerruki <[email protected]>2026-04-20 22:37:26 +0800
commitd782aae00f82bd160b0fc5c0cdac1ba27ae8ade1 (patch)
tree17cfef203818daeb5ca86af19677440d4080cb3c /xmake/modules
parent35d37f98381d8486f23b7761c90acdba3fc2e9d1 (diff)
add --format
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/private/action/require/depgraph.lua4
-rw-r--r--xmake/modules/private/xrepo/action/info.lua4
2 files changed, 4 insertions, 4 deletions
diff --git a/xmake/modules/private/action/require/depgraph.lua b/xmake/modules/private/action/require/depgraph.lua
index ba1fb9ff4..200d9ed3e 100644
--- a/xmake/modules/private/action/require/depgraph.lua
+++ b/xmake/modules/private/action/require/depgraph.lua
@@ -139,7 +139,7 @@ end
-- show the given package dependency graph
--
-- supported output formats (via --format):
--- tree (default): ASCII tree view
+-- plain (default): ASCII tree view
-- json: structured JSON output
-- dot: graphviz DOT format
--
@@ -164,7 +164,7 @@ function main(requires_raw)
local graph = _collect_package_graph(instances)
-- output in the specified format
- local format = option.get("format") or "tree"
+ local format = option.get("format") or "plain"
if format == "json" then
print(json.encode(graph, {pretty = true, orderkeys = true}))
elseif format == "dot" then
diff --git a/xmake/modules/private/xrepo/action/info.lua b/xmake/modules/private/xrepo/action/info.lua
index d7420533d..0a9c1c514 100644
--- a/xmake/modules/private/xrepo/action/info.lua
+++ b/xmake/modules/private/xrepo/action/info.lua
@@ -49,8 +49,8 @@ function menu_options()
"e.g.",
" - xrepo info --format=json zlib",
" - xrepo info --depgraph --format=dot libpng",
- "values: json (for --info/--depgraph), tree/dot (for --depgraph only)",
- values = {"tree", "json", "dot"}},
+ "values: json (for --info/--depgraph), dot (for --depgraph only)",
+ values = {"plain", "json", "dot"}},
{},
{nil, "packages", "vs", nil, "The packages list.",
"e.g.",