File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed
Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ From: Antoni Villalonga <
[email protected] >
2+ Date: Fri, 28 Aug 2020 02:09:42 +0200
3+ Subject: Rescue getcwd ENOENT error
4+ Forwarded: not-needed
5+ Bug-Debian: http://bugs.debian.org/969130
6+ Upstream-Author: David Rodríguez
7+
8+ Rescue ENOENT error allowing run ruby scripts when cwd does not exists.
9+ Cherry-pick from upstream 96064e6f1ce100a37680dc8f9509f06b3350e9c8
10+
11+ --- a/lib/rubygems/bundler_version_finder.rb
12+ +++ b/lib/rubygems/bundler_version_finder.rb
13+ @@ -82,12 +82,19 @@
14+ def self.lockfile_contents
15+ gemfile = ENV["BUNDLE_GEMFILE"]
16+ gemfile = nil if gemfile && gemfile.empty?
17+ - Gem::Util.traverse_parents Dir.pwd do |directory|
18+ - next unless gemfile = Gem::GEM_DEP_FILES.find { |f| File.file?(f.tap(&Gem::UNTAINT)) }
19+
20+ - gemfile = File.join directory, gemfile
21+ - break
22+ - end unless gemfile
23+ + unless gemfile
24+ + begin
25+ + Gem::Util.traverse_parents(Dir.pwd) do |directory|
26+ + next unless gemfile = Gem::GEM_DEP_FILES.find { |f| File.file?(f.tap(&Gem::UNTAINT)) }
27+ +
28+ + gemfile = File.join directory, gemfile
29+ + break
30+ + end
31+ + rescue Errno::ENOENT
32+ + return
33+ + end
34+ + end
35+
36+ return unless gemfile
37+
Original file line number Diff line number Diff line change 770007-Fix-FTBFS-on-x32-misdetected-as-i386-or-amd64.patch
880010-Fix-IRBTestIRBHistory-tests.patch
990012-Dont-use-relative-path.patch
10+ 0010-Fix-getcwd-ENOENT.patch
You can’t perform that action at this time.
0 commit comments