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

Fix gem install portability by avoiding a shell feature dependency #190

Merged
merged 2 commits into from
Apr 7, 2021

Conversation

dylanahsmith
Copy link
Collaborator

Problem

@casperisfine I tried adding bundle exec rake install to CI as you suggested in #186 (comment) and it failed. I was able to reproduce the error in on ubuntu and found the source of the problem was the {lib,ext,vendor} shell glob expansion, which didn't work in the shell spawned by ruby.

E.g. in macOS I get

irb(main):001:0> `echo {lib,ext,vendor}`
=> "lib ext vendor\n"

but on Ubuntu I get

irb(main):001:0> `echo {lib,ext,vendor}`
=> "{lib,ext,vendor}\n"

Solution

The gemspec file generated by bundle gem avoids this problem by doing file filtering using ruby, so it doesn't depend on what shell features are available.

When I tested on ubuntu, the `{lib,ext,vendor}` glob feature worked
in the interactive shell, but not in the non-interactive one spawned
by ruby.
dylanahsmith added a commit to dylanahsmith/memcached that referenced this pull request Apr 7, 2021
@dylanahsmith dylanahsmith merged commit fe7daf5 into arthurnn:master Apr 7, 2021
@dylanahsmith dylanahsmith deleted the fix-gem-install branch April 7, 2021 16:46
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.

2 participants