aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/markdown/snippets/introspect_multiple.md2
-rw-r--r--mesonbuild/mintro.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/docs/markdown/snippets/introspect_multiple.md b/docs/markdown/snippets/introspect_multiple.md
index 53278e6..97fdf8c 100644
--- a/docs/markdown/snippets/introspect_multiple.md
+++ b/docs/markdown/snippets/introspect_multiple.md
@@ -7,7 +7,7 @@ object.
The format for a single command was not changed to keep backward
compatibility.
-Furthermore the option `-a,--all`, `-i,--indent` and `-f,--force-new`
+Furthermore the option `-a,--all`, `-i,--indent` and `-f,--force-dict-output`
were added to print all introspection information in one go, format the
JSON output (the default is still compact JSON) and foce use the new
output format, even if only one introspection command was given.
diff --git a/mesonbuild/mintro.py b/mesonbuild/mintro.py
index 4de16ca..4a20e6b 100644
--- a/mesonbuild/mintro.py
+++ b/mesonbuild/mintro.py
@@ -62,7 +62,7 @@ def add_arguments(parser):
help='Print all available information.')
parser.add_argument('-i', '--indent', dest='indent', type=int, default=0,
help='Number of spaces used for indentation.')
- parser.add_argument('-f', '--force-new', action='store_true', dest='force_new', default=False,
+ parser.add_argument('-f', '--force-dict-output', action='store_true', dest='force_dict', default=False,
help='Always use the new JSON format for multiple entries (even for 0 and 1 introspection commands)')
parser.add_argument('builddir', nargs='?', default='.', help='The build directory')
@@ -504,10 +504,10 @@ def run(options):
indent = options.indent if options.indent > 0 else None
- if len(results) == 0 and not options.force_new:
+ if len(results) == 0 and not options.force_dict:
print('No command specified')
return 1
- elif len(results) == 1 and not options.force_new:
+ elif len(results) == 1 and not options.force_dict:
# Make to keep the existing output format for a single option
print(json.dumps(results[0][1], indent=indent))
else: