summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSHIBATA Hiroshi <hsbt@ruby-lang.org>2018-10-16 17:32:29 +0900
committerSHIBATA Hiroshi <hsbt@ruby-lang.org>2018-10-20 19:59:02 +0900
commit91aaca762be64f807072a1445d6291314790a06d (patch)
tree4dfc87512a60c1da51f5cf8b01348d249e8ffbdf
parent94f664fc4c55441736aa173b57b1bad6d7ef761d (diff)
downloadbundler-91aaca762be64f807072a1445d6291314790a06d.tar.gz
rubocop -a
-rw-r--r--lib/bundler/shared_helpers.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb
index c4dce8c38f..b5ca8c2bd3 100644
--- a/lib/bundler/shared_helpers.rb
+++ b/lib/bundler/shared_helpers.rb
@@ -274,12 +274,10 @@ module Bundler
until !File.directory?(current) || current == previous
if ENV["BUNDLE_SPEC_RUN"]
- if File.file?(File.join(current, "bundler.gemspec"))
- gemspec = "bundler.gemspec"
- else
- # for Ruby Core
- gemspec = "lib/bundler.gemspec"
- end
+ gemspec = File.join(current, "bundler.gemspec")
+ # for Ruby Core
+ gemspec = File.join(current, "lib/bundler.gemspec") unless File.file?(gemspec)
+
# avoid stepping above the tmp directory when testing
return nil if File.file?(File.join(current, gemspec))
end