Skip to content

Commit 384ddc5

Browse files
jDramaixcopybara-github
authored andcommitted
Fix jar extraction in release.sh
Github action environment uses jar version 21 that does not accept -C option with extract mode. A simple fix is to create a subshell in order to cd into the right directory before extracting the jar. PiperOrigin-RevId: 845286011
1 parent 253397b commit 384ddc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ build_and_prepare() {
119119
if [[ -f "${mvn_artifact_id}.jar" ]]; then
120120
echo "Extracting: ${mvn_artifact_id}.jar in the classes directory."
121121
mkdir "${mvn_artifact_id}-classes"
122-
jar xf "${mvn_artifact_id}.jar" -C "${mvn_artifact_id}-classes"
122+
(cd "${mvn_artifact_id}-classes" && jar xf "${mvn_temp_wd}/${mvn_artifact_id}.jar")
123123
rm "${mvn_artifact_id}.jar"
124124
fi
125125

0 commit comments

Comments
 (0)