Commit fbc5e53d authored by Dmitry Trofimovich's avatar Dmitry Trofimovich Committed by Chromium LUCI CQ

Forward '--help' command in Python wraper for JVM scripts.

'java_binary' GN template when building JVM app generates Python
wrapper script in 'bin' dir. This wrapper script forwards all unknown
args (if '--jar-args' argument is omitted) to the underlying JVM
binary. But it doesn't do that for '--help' command replacing it
with standard Python 'argparse' autogenerated help.
Current users of 'java_binary' template ('errorprone_plugin',
'bytecode_processor', 'hello_world') have no '--help' command and OK
with that. But targets in some external projects have it and not OK.

Bug: 1146355
Change-Id: Id737118c519747b216b676d61626f40e4dac9650
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2578901
Commit-Queue: Peter Wen <wnwen@chromium.org>
Reviewed-by: default avatarPeter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#834781}
parent bad01b15
......@@ -40,7 +40,7 @@ if os.getcwd() != self_dir:
java_path = fix_path(java_path)
java_cmd = [java_path]
# This is a simple argparser for jvm, jar, and classpath arguments.
parser = argparse.ArgumentParser()
parser = argparse.ArgumentParser(add_help=False)
parser.add_argument('--jar-args')
parser.add_argument('--jvm-args')
parser.add_argument('--classpath')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment