Set GRAALVM_HOME for GraalVM distributions - #1146
Merged
Merged
Conversation
5 tasks
Copilot
AI
changed the title
[WIP] Fix setup-java to set GRAALVM_HOME environment variable
Set GRAALVM_HOME for GraalVM distributions
Jul 28, 2026
brunoborges
approved these changes
Jul 28, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request restores compatibility with workflows that expect GRAALVM_HOME to be set (notably when migrating from graalvm/setup-graalvm) by exporting GRAALVM_HOME whenever a GraalVM distribution is installed via actions/setup-java.
Changes:
- Export
GRAALVM_HOME(set to the same path asJAVA_HOME) for GraalVM distributions by overridingsetJavaDefault. - Add unit coverage to verify
GRAALVM_HOMEis exported for both Oracle GraalVM and GraalVM Community. - Update the checked-in compiled action bundle (
dist/setup/index.js).
Show a summary per file
| File | Description |
|---|---|
| src/distributions/graalvm/installer.ts | Override setJavaDefault to export GRAALVM_HOME alongside the existing JAVA_HOME behavior. |
| tests/distributors/graalvm-installer.test.ts | Adds tests asserting GRAALVM_HOME is exported for Oracle GraalVM and GraalVM Community installers. |
| dist/setup/index.js | Updates the bundled distribution to include the new GRAALVM_HOME export logic. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/3 changed files
- Comments generated: 0
- Review effort level: Low
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
GraalVM workflows could not locate tools through
GRAALVM_HOME, breaking compatibility withgraalvm/setup-graalvm.GRAALVM_HOMEalongsideJAVA_HOMEfor Oracle GraalVM and GraalVM Community.Related issue:
GraalVM environment compatibility when migrating from
graalvm/setup-graalvm.Check list:
npm run checklocally (format, lint, build, test) and all checks pass.