mirror of
https://github.com/google/nomulus.git
synced 2025-05-23 12:49:38 +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
a5364a5bab
commit
103c87ed7d
2 changed files with 6 additions and 1 deletions
|
@ -63,6 +63,7 @@ function callGoogleJavaFormatDiff() {
|
|||
showNoncompliantFiles "$forkPoint" "\033[1mNeeds formatting: "
|
||||
callResult=$(git diff -U0 ${forkPoint} | \
|
||||
${SCRIPT_DIR}/google-java-format-diff.py \
|
||||
--java-binary "$JAVA_HOME/bin/java" \
|
||||
--google-java-format-jar "${SCRIPT_DIR}/${JAR_NAME}" \
|
||||
-p1 | wc -l)
|
||||
;;
|
||||
|
@ -70,12 +71,14 @@ function callGoogleJavaFormatDiff() {
|
|||
showNoncompliantFiles "$forkPoint" "\033[1mReformatting: "
|
||||
callResult=$(git diff -U0 ${forkPoint} | \
|
||||
${SCRIPT_DIR}/google-java-format-diff.py \
|
||||
--java-binary "$JAVA_HOME/bin/java" \
|
||||
--google-java-format-jar "${SCRIPT_DIR}/${JAR_NAME}" \
|
||||
-p1 -i)
|
||||
;;
|
||||
"show")
|
||||
callResult=$(git diff -U0 ${forkPoint} | \
|
||||
${SCRIPT_DIR}/google-java-format-diff.py \
|
||||
--java-binary "$JAVA_HOME/bin/java" \
|
||||
--google-java-format-jar "${SCRIPT_DIR}/${JAR_NAME}" \
|
||||
-p1)
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue