Merged
Conversation
$BASH_SOURCE give better guarantees (e.g. if the launcher is sourced instead of exec'd)
Values are stored as un-expanded variable expansions, i.e. '${1#-J}' and
expanded when needed. The original positional parameters are kept as
long as possible so they can be referenced by the "arrays". Currently
there's no way to store an expansion with whitespace, but if necessary
the whitespace could be stored in its own variable.
Member
|
Nobody should be relying on |
Member
|
Note we do have a |
Member
|
Thank you! This has been merged to master. I will do some cleanup to move this to We look forward to further improvements! |
headius
added a commit
to headius/jruby
that referenced
this pull request
Jan 31, 2022
* bin/jruby.bash sh script moved to bin/jruby.sh * build copies bin/jruby.sh to bin/jruby if it is missing * bin/jruby.bash warns of deprecation and launches bin/jruby.sh * doco changes throughout See jruby#7024
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.
The hardest thing to port is arrays, so I had the idea to store un-expanded variables in a string, then expand them with eval later. It's a little fragile to maintain but it works. Some documentation would probably be necessary to avoid unsafe evals.
I'm also not sure what to call the new script. I changed the shebang to
/bin/shfor testing purposes but the filename still ends in .bash, and users may rely on that file being there.Depends on #7022.