diff options
author | Jukka Laurila <jlaurila@google.com> | 2018-03-05 22:25:27 +0100 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-03-06 14:02:55 +0200 |
commit | 048508c989081f8bcf54d76f5b13138cc3f47738 (patch) | |
tree | b3c9ea44c00dc3d1dc5d22ada4d0de97aa605095 /mesonbuild/mesonmain.py | |
parent | fa1401bec1ce74f120bae8747c02db51b287d950 (diff) | |
download | meson-048508c989081f8bcf54d76f5b13138cc3f47738.zip meson-048508c989081f8bcf54d76f5b13138cc3f47738.tar.gz meson-048508c989081f8bcf54d76f5b13138cc3f47738.tar.bz2 |
Make "meson help" and "meson help <subcommand>" do the expected thing.
Diffstat (limited to 'mesonbuild/mesonmain.py')
-rw-r--r-- | mesonbuild/mesonmain.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py index e354cce..69b4e31 100644 --- a/mesonbuild/mesonmain.py +++ b/mesonbuild/mesonmain.py @@ -284,6 +284,13 @@ def run(original_args, mainfile=None): # First check if we want to run a subcommand. cmd_name = args[0] remaining_args = args[1:] + # "help" is a special case: Since printing of the help may be + # delegated to a subcommand, we edit cmd_name before executing + # the rest of the logic here. + if cmd_name == 'help': + remaining_args += ['--help'] + args = remaining_args + cmd_name = args[0] if cmd_name == 'test': return mtest.run(remaining_args) elif cmd_name == 'setup': |