mirror of
https://github.com/google/nomulus.git
synced 2025-07-03 17:53:27 +02:00
Print out env variables in java format (#998)
* Print out env variables in java format Print out JAVA_HOME and PATH variable in the google-java-format-diff.py script immediately prior to running the underlying java program that does the actual format checking. * Use the java binary from JAVA_HOME for java-format Use "$JAVA_HOME/bin/java" for invoking the java format check instead of whatever version of java happens to be on the path. * Removed unused import
This commit is contained in:
parent
c7c03874c0
commit
24ad8c4557
2 changed files with 6 additions and 1 deletions
|
@ -55,6 +55,8 @@ def main():
|
|||
parser.add_argument('-b', '--binary', help='path to google-java-format binary')
|
||||
parser.add_argument('--google-java-format-jar', metavar='ABSOLUTE_PATH', default=None,
|
||||
help='use a custom google-java-format jar')
|
||||
parser.add_argument('-j', '--java-binary', default='java',
|
||||
help='path to the java binary')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
|
@ -91,7 +93,7 @@ def main():
|
|||
if args.binary:
|
||||
base_command = [args.binary]
|
||||
elif args.google_java_format_jar:
|
||||
base_command = ['java', '-jar', args.google_java_format_jar]
|
||||
base_command = [args.java_binary, '-jar', args.google_java_format_jar]
|
||||
else:
|
||||
binary = find_executable('google-java-format') or '/usr/bin/google-java-format'
|
||||
base_command = [binary]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue