From 81bfa641b0c417daf5f8da7106cd29e6f422d1a9 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Wed, 17 Jun 2020 17:42:32 +0200 Subject: [PATCH 1/3] Normalize extendedJavaHome environment variable The extendedJavaHome environment variable contains `.` symbols in the version. This causes the environment variable to be ignored by the action runner. It's best to replace those and other non standard symbols with and underscore. For reference: > Environment variable names used by the utilities in the Shell and Utilities volume of IEEE Std 1003.1-2001 consist solely of uppercase letters, digits, and the '_' (underscore) from the characters defined in Portable Character Set . --- dist/index.js | Bin 169053 -> 169140 bytes src/installer.ts | 1 + 2 files changed, 1 insertion(+) diff --git a/dist/index.js b/dist/index.js index 263460632253c415a88c1012a6a5d2f9af433039..36a56bb73bce8868edb84e236002e4167cd11d36 100644 GIT binary patch delta 101 zcmcb+f@{l4u7(!IEllsTd{Qe)Qu9($Q@j$(5Qj44ui&Hf; r^@>spauSnMHT0w740J6Wb)({A_0x3})Z^8sOJp<2Z)eVCiqZrCxt1dy delta 24 gcmdn8lI!jYu7(!IEllsTrdMS%iENL`W{T1T0EW~Fo&W#< diff --git a/src/installer.ts b/src/installer.ts index 487db6ff..7a8feaec 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -87,6 +87,7 @@ export async function getJava( } let extendedJavaHome = 'JAVA_HOME_' + version + '_' + arch; + extendedJavaHome = extendedJavaHome.toUpperCase().replace(/[^0-9A-Z_]/g, '_'); core.exportVariable('JAVA_HOME', toolPath); core.exportVariable(extendedJavaHome, toolPath); core.addPath(path.join(toolPath, 'bin')); From 655cb05195987cc98509c9d014293425433f2676 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Wed, 17 Jun 2020 19:37:01 +0200 Subject: [PATCH 2/3] Add comment explaining why the environment variable should be normalized --- dist/index.js | Bin 169140 -> 169451 bytes src/installer.ts | 4 ++++ 2 files changed, 4 insertions(+) diff --git a/dist/index.js b/dist/index.js index 36a56bb73bce8868edb84e236002e4167cd11d36..aed138ad17ae55d4664c10766b648384030b303f 100644 GIT binary patch delta 308 zcmYk0F;2rk5Ji=g?rErg7a@Uj3xue1f$@66ZnWO9X2%Y$Lct9<1)`0_EjR`Z1y^7V z6rN^AU-SR_=hy1%t$KQ1o!8%o%k37oqUc49nh=9cP^K&?zYs1?8QIGaTS$r%T#-XI z$iBk=6#vlotd24xvKec>MjIZ2l})LIdB%|1qB~KpvGc6FFDH&XCyuPPjGO=Y(YRRJ z(>;xJCmmxX4b()2$sZ8E#2KL6M{ Date: Wed, 17 Jun 2020 21:37:10 +0200 Subject: [PATCH 3/3] Keep old environment variable for backwards compatibility --- dist/index.js | Bin 169451 -> 169530 bytes src/installer.ts | 1 + 2 files changed, 1 insertion(+) diff --git a/dist/index.js b/dist/index.js index aed138ad17ae55d4664c10766b648384030b303f..d77e3beb31427bed5ab566eabefe2c8b0a2a2b67 100644 GIT binary patch delta 47 zcmaF8nrqh@u7(!IEllsTrf