From 2edb1244d560d47de2d3256365e3ccfa053ccd10 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 28 Jul 2026 02:02:30 +0000 Subject: [PATCH 1/3] Initial plan From 04e6a029504ffb4fd1bb88c7a935ee90bf79d775 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 28 Jul 2026 02:05:27 +0000 Subject: [PATCH 2/3] Set GRAALVM_HOME for GraalVM distributions --- .../distributors/graalvm-installer.test.ts | 23 +++++++++++++++++++ src/distributions/graalvm/installer.ts | 5 ++++ 2 files changed, 28 insertions(+) diff --git a/__tests__/distributors/graalvm-installer.test.ts b/__tests__/distributors/graalvm-installer.test.ts index c2e303d99..0882c6ca4 100644 --- a/__tests__/distributors/graalvm-installer.test.ts +++ b/__tests__/distributors/graalvm-installer.test.ts @@ -166,6 +166,29 @@ describe('GraalVMDistribution', () => { }); }); + describe('setJavaDefault', () => { + it('should set GRAALVM_HOME for Oracle GraalVM', () => { + (distribution as any).setJavaDefault('17.0.5', '/cached/java/path'); + + expect(core.exportVariable).toHaveBeenCalledWith( + 'GRAALVM_HOME', + '/cached/java/path' + ); + }); + + it('should set GRAALVM_HOME for GraalVM Community', () => { + (communityDistribution as any).setJavaDefault( + '17.0.5', + '/cached/java/path' + ); + + expect(core.exportVariable).toHaveBeenCalledWith( + 'GRAALVM_HOME', + '/cached/java/path' + ); + }); + }); + describe('downloadTool', () => { const javaRelease = { version: '17.0.5', diff --git a/src/distributions/graalvm/installer.ts b/src/distributions/graalvm/installer.ts index ccbb5b441..d2255a22b 100644 --- a/src/distributions/graalvm/installer.ts +++ b/src/distributions/graalvm/installer.ts @@ -110,6 +110,11 @@ export class GraalVMDistribution extends JavaBase { } } + protected setJavaDefault(version: string, toolPath: string): void { + super.setJavaDefault(version, toolPath); + core.exportVariable('GRAALVM_HOME', toolPath); + } + protected async findPackageForDownload( range: string ): Promise { From dfd0086192c2d9a985fa98c81f7fe6376a2dc1c8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 28 Jul 2026 02:09:02 +0000 Subject: [PATCH 3/3] Rebuild setup action bundle --- dist/setup/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dist/setup/index.js b/dist/setup/index.js index 89e5b84e9..c547ea81f 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -131328,6 +131328,10 @@ class GraalVMDistribution extends JavaBase { throw error; } } + setJavaDefault(version, toolPath) { + super.setJavaDefault(version, toolPath); + exportVariable('GRAALVM_HOME', toolPath); + } async findPackageForDownload(range) { this.validateVersionRange(range); const arch = this.getSupportedArchitecture();