Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rubygems#6191 - elia:patch-1, r=colby-swandale
Ensure git is executed inside the gemspec dir ### What was the end-user problem that led to this PR? Executables from bundled gems weren't available. ``` Gem::Exception: can't find executable <EXEC-FILENAME> for gem <GEM-NAME> /Users/elia/.rvm/rubies/ruby-2.3.4/lib/ruby/site_ruby/2.3.0/bundler/rubygems_integration.rb:458:in `block in replace_bin_path' /Users/elia/.rvm/rubies/ruby-2.3.4/lib/ruby/site_ruby/2.3.0/bundler/rubygems_integration.rb:478:in `block in replace_bin_path' … ``` ### What was your diagnosis of the problem? When a Gemfile was pointing to a local gem using git to list its files the git command was executed from within the wrong dir. ### What is your fix for the problem, implemented in this PR? Initially I added `-C #{__dir__}` to the `git ls-files -z` command. ### Why did you choose this fix out of the possible options? Realized `-C` wasn't safe and opted for stuff already available in the corelib, i.e. `Dir.chrid` instead of, say, escaping with `shellwords`. --- I know the line is long-ish, happy to fix it in the way you want
- Loading branch information