Skip to content
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

Remove array expansion of JAVA_OPTS environment variable #6016

Merged
merged 1 commit into from Jan 1, 2020

Conversation

mrnoname1000
Copy link
Contributor

@mrnoname1000 mrnoname1000 commented Jan 1, 2020

Looks like I broke something in my bash cleanup. This variable can never start as an array since it's from the environment. Treating it as an array parses all the options as one, so none of the variables the case statement get set right.
It is expanded correctly later, so the flags are passed to java, but the default value of -Xss is appended and overrides the previous one (I assume).
Setting JAVA_OPTS to something not starting with -Xss, e.g. -Xms256m -Xss4096k and putting this:

printf JAVA_OPTS: ; printf ' "%s"' $JAVA_OPTS; echo

somewhere late in the script shows the incorrect behaviour.

@enebo enebo added this to the JRuby 9.2.10.0 milestone Jan 1, 2020
@enebo enebo merged commit a6470ad into jruby:master Jan 1, 2020
5 checks passed
@enebo
Copy link
Member

@enebo enebo commented Jan 1, 2020

@mrnoname1000 I am not advocating this but I wonder if people unit test shell scripts (answer: I am sure someone does). I have thought about this in the past with respect to tests defining usage examples of expected behavior. Just a random drive-by musing...

@mrnoname1000 mrnoname1000 deleted the fix_java_opts branch Jan 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants