mirror of
https://github.com/google/nomulus
synced 2026-01-03 03:35:42 +00: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:
@@ -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)
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user