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

Accept not only /usr/bin/env but also /bin/env in some tests #3422

Merged
merged 1 commit into from Mar 24, 2020

Conversation

mame
Copy link
Contributor

@mame mame commented Mar 24, 2020

RubyGems chooses available one from the two: /usr/bin/env or /bin/env

ENV_PATHS = %w[/usr/bin/env /bin/env].freeze

So, it is good not to hard-code /usr/bin/env in tests.

Actually, these tests fail on Android because it provides /bin/env
available but not /usr/bin/env.

https://rubyci.org/logs/rubyci.s3.amazonaws.com/android28-x86_64/ruby-master/log/20200324T074312Z.fail.html.gz

RubyGems chooses available one from the two: /usr/bin/env or /bin/env

https://github.com/rubygems/rubygems/blob/20b0d609484df2b514954ba9ef890a7cbdd01d18/lib/rubygems/installer.rb#L38

So, it is good not to hard-code /usr/bin/env in tests.

Actually, these tests fail on Android because it provides /bin/env
available but not /usr/bin/env.

https://rubyci.org/logs/rubyci.s3.amazonaws.com/android28-x86_64/ruby-master/log/20200324T074312Z.fail.html.gz
@mame
Copy link
Contributor Author

mame commented Mar 24, 2020

This change had been introduced in ruby/ruby but (maybe accidentally) removed by ruby/ruby#2889 :-) @deivid-rodriguez

@deivid-rodriguez
Copy link
Member

deivid-rodriguez commented Mar 24, 2020

Thank you @mame! Yes, it was unintentional. Since the changes had not been contributed upstream, they got unintentionally reverted when syncing when upstream master.

@deivid-rodriguez deivid-rodriguez merged commit 5942bd6 into rubygems:master Mar 24, 2020
@mame
Copy link
Contributor Author

mame commented Mar 24, 2020

Thanks!

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

3 participants