Skip to content

Commit fe9e0ba

Browse files
authored
100: Expand shell variables earlier (#101)
Expand shell variables earlier by switching to using environment variables and referencing them in the bash commands from that rather than directly interpolating the variables. Closes #100
1 parent 046716c commit fe9e0ba

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

action.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ runs:
4545
- name: 'Download Java Development Kit'
4646
id: download
4747
shell: bash
48+
env:
49+
WEBSITE: "${{ inputs.website }}"
50+
RELEASE: "${{ inputs.release }}"
51+
VERSION: "${{ inputs.version }}"
52+
INSTALL_AS_VERSION: "${{ inputs.install-as-version }}"
53+
URI: "${{ inputs.uri }}"
4854
run: |
4955
echo "::group::Prepare download..."
5056
JAVA=$JAVA_HOME_21_X64/bin/java
@@ -54,18 +60,18 @@ runs:
5460
$JAVA --version
5561
DOWNLOAD=$GITHUB_ACTION_PATH/src/Download.java
5662
echo "::endgroup::"
57-
if [ ! -z "${{ inputs.uri }}" ]; then
63+
if [ ! -z "$URI" ]; then
5864
$JAVA \
59-
-Dinstall-as-version="${{ inputs.install-as-version }}" \
65+
-Dinstall-as-version="$INSTALL_AS_VERSION" \
6066
$DOWNLOAD \
61-
${{ inputs.uri }}
67+
$URI
6268
else
6369
$JAVA \
64-
-Dinstall-as-version="${{ inputs.install-as-version }}" \
70+
-Dinstall-as-version="$INSTALL_AS_VERSION" \
6571
$DOWNLOAD \
66-
${{ inputs.website }} \
67-
${{ inputs.release }} \
68-
${{ inputs.version }}
72+
$WEBSITE \
73+
$RELEASE \
74+
$VERSION
6975
fi
7076
- name: 'Install Java Development Kit'
7177
if: ${{ inputs.install == 'true' }}

test/Test.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ static void checkAllOracleJDKs() {
3030
System.out.println();
3131
System.out.println("// oracle.com - latest");
3232
checkOracleJDK("24", "latest");
33-
checkOracleJDK("23", "latest");
3433
checkOracleJDK("21", "latest");
3534

3635
System.out.println();

0 commit comments

Comments
 (0)