summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Suzuki <kohei-suzuki@cookpad.com>2013-05-15 16:28:06 +0900
committerKohei Suzuki <kohei-suzuki@cookpad.com>2013-05-23 13:32:41 +0900
commit0e55bdbbd989f84ce4220bc783ccfb0c50fa7219 (patch)
treef63d28a7d2f384614ce1a9f433f368475b3ecba2
parentc3a986690addc6222ca1896eece96e757e333868 (diff)
downloadbundler-0e55bdbbd989f84ce4220bc783ccfb0c50fa7219.tar.gz
Fix to use SharedHelpers.pwd
-rw-r--r--lib/bundler/gem_helper.rb2
-rw-r--r--lib/bundler/shared_helpers.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb
index b7ab72fac5..6b7a1760ca 100644
--- a/lib/bundler/gem_helper.rb
+++ b/lib/bundler/gem_helper.rb
@@ -24,7 +24,7 @@ module Bundler
def initialize(base = nil, name = nil)
Bundler.ui = UI::Shell.new
- @base = (base ||= Dir.pwd)
+ @base = (base ||= SharedHelpers.pwd)
gemspecs = name ? [File.join(base, "#{name}.gemspec")] : Dir[File.join(base, "{,*}.gemspec")]
raise "Unable to determine name from existing gemspec. Use :name => 'gemname' in #install_tasks to manually set it." unless gemspecs.size == 1
@spec_path = gemspecs.first
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb
index 227d9b5223..ff14ea5a79 100644
--- a/lib/bundler/shared_helpers.rb
+++ b/lib/bundler/shared_helpers.rb
@@ -52,7 +52,7 @@ module Bundler
return given if given && !given.empty?
previous = nil
- current = File.expand_path(Dir.pwd)
+ current = File.expand_path(SharedHelpers.pwd)
until !File.directory?(current) || current == previous
if ENV['BUNDLE_SPEC_RUN']