We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4f8f38 commit 67ce6dfCopy full SHA for 67ce6df
1 file changed
bundler/lib/bundler/source/path.rb
@@ -220,10 +220,11 @@ def generate_bin(spec, options = {})
220
# Some gem authors put absolute paths in their gemspec
221
# and we have to save them from themselves
222
spec.files = spec.files.filter_map do |path|
223
- next path unless /\A#{Pathname::SEPARATOR_PAT}/o.match?(path)
+ pathname = Pathname.new(path)
224
+ next path unless pathname.absolute?
225
next if File.directory?(path)
226
begin
- Pathname.new(path).relative_path_from(gem_dir).to_s
227
+ pathname.relative_path_from(gem_dir).to_s
228
rescue ArgumentError
229
path
230
end
0 commit comments