-
Notifications
You must be signed in to change notification settings - Fork 820
Normalize extendedJavaHome environment variable #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -87,6 +87,12 @@ export async function getJava( | |
| } | ||
|
|
||
| let extendedJavaHome = 'JAVA_HOME_' + version + '_' + arch; | ||
| core.exportVariable(extendedJavaHome, toolPath); //TODO: remove for v2 | ||
| // For portability reasons environment variables should only consist of | ||
| // uppercase letters, digits, and the underscore. Therefore we convert | ||
| // the extendedJavaHome variable to upper case and replace '.' symbols and | ||
| // any other non-alphanumeric characters with an underscore. | ||
| extendedJavaHome = extendedJavaHome.toUpperCase().replace(/[^0-9A-Z_]/g, '_'); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks like a breaking change. Should the old variable be set also, so existing customers dont get broken?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point. It could break certain users if they're actually able to use the current variable. When we eventually release a v2 version of setup-java, then we can remove the old one (we don't promise compat between the new versions).
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good, I just pushed a new commit that keeps the old variable. |
||
| core.exportVariable('JAVA_HOME', toolPath); | ||
| core.exportVariable(extendedJavaHome, toolPath); | ||
| core.addPath(path.join(toolPath, 'bin')); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.