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
Modify shebang to use settings #6488
base: master
Are you sure you want to change the base?
Conversation
Thanks for opening a pull request and helping make RubyGems and Bundler better! Someone from the RubyGems team will take a look at your pull request shortly and leave any feedback. Please make sure that your pull request has tests for any changes or added functionality. We use GitHub Actions to test and make sure your change works functionally and uses acceptable conventions, you can review the current progress of GitHub Actions in the PR status window below. If you have any questions or concerns that you wish to ask, feel free to leave a comment in this PR or join our #rubygems or #bundler channel on Slack. For more information about contributing to the RubyGems project feel free to review our CONTRIBUTING guide |
@@ -172,7 +172,7 @@ def install(spec, options = {}) | |||
:bin_dir => bin_path.to_s, | |||
:ignore_dependencies => true, | |||
:wrappers => true, | |||
:env_shebang => true, | |||
:env_shebang => Bundler.settings[:shebang], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 I see there was some discussion for this at #6478 already. Looking at this again, Bundler.settings[:shebang]
is nil
by default. To keep this backward compatible, would it make sense to keep the default true
, but respect Bundler.settings[:shebang]
when set (aka when not nil
)? Also some test would be great to cover this.
If I understand it well, this current code change changes the behaviour, but there are no failing specs. Would it be possible to cover this better in test suite? |
@simi I created this PR based on @deivid-rodriguez suggestion. I wouldn't know how to do the requested changes. Please feel free to update the PR or replace with new one that includes this fix. Thanks |
@cdenneen Can you confirm that you have Unifying Bundler & RubyGems shebang behavior would be a separate thing. |
I'm not putting that in a How do you propose to check the RubyGems setting to fix this? So your suggestion is to create a
|
@deivid-rodriguez also it's been a bit since I opened this but if I recall the issue here isn't the So doesn't |
I've tried adding this
Where as when I did the
|
This will be bigger issue for me since the embedded ruby is 2.5 so latest ruby gem I can upgrade to is the 3.3.x releases, would need to patch this into 3.3.27 or something |
Hei! So what I meant to say is that I realized that the So, instead of respecting that setting here, I think we should respect the RubyGems setting. That RubyGems setting is controlled by the Regardless of this, handling backwards compatibility seems hard here 🤔. |
@deivid-rodriguez do you know of any workaround/hack for this? If I install the gems via |
Given the value is currently hardcoded, there's no workaround at the moment. Regarding backwards compatibility, it should be very rare for someone to want conflicting settings for Bundler & RubyGems (if we go with using the value of So I think I'd go with @simi's suggestion at #6488 (comment). If we go that way, we need to:
|
Allow shebang to use settings
The shebang setting is a string, where as Adding |
Fixes #6478