summaryrefslogtreecommitdiff
path: root/lib/bundler/shared_helpers.rb
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-07-15 13:36:31 -0500
committerSamuel Giddins <segiddins@segiddins.me>2016-07-19 17:13:45 -0500
commite7b4b41cd026883816a6fdb431a9b2cb91f59c09 (patch)
treeb009039efa99bc1f332f6e4c8ee3708d4715d2ff /lib/bundler/shared_helpers.rb
parent752ad8a4c10d6f43eecbfdf8b6a3c7f692ab9692 (diff)
downloadbundler-e7b4b41cd026883816a6fdb431a9b2cb91f59c09.tar.gz
Mild 1.8.7 $SAFE=1 compatibilityseg-gem-dep-api-compatibility
Diffstat (limited to 'lib/bundler/shared_helpers.rb')
-rw-r--r--lib/bundler/shared_helpers.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb
index efbedeb374..69543356a2 100644
--- a/lib/bundler/shared_helpers.rb
+++ b/lib/bundler/shared_helpers.rb
@@ -23,7 +23,7 @@ module Bundler
def default_gemfile
gemfile = find_gemfile
raise GemfileNotFound, "Could not locate Gemfile" unless gemfile
- Pathname.new(gemfile)
+ Pathname.new(gemfile).untaint
end
def default_lockfile
@@ -32,7 +32,7 @@ module Bundler
case gemfile.basename.to_s
when "gems.rb" then Pathname.new(gemfile.sub(/.rb$/, ".locked"))
else Pathname.new("#{gemfile}.lock")
- end
+ end.untaint
end
def default_bundle_dir
@@ -102,7 +102,7 @@ module Bundler
#
# @see {Bundler::PermissionError}
def filesystem_access(path, action = :write)
- yield path
+ yield path.dup.untaint
rescue Errno::EACCES
raise PermissionError.new(path, action)
rescue Errno::EAGAIN
@@ -158,7 +158,7 @@ module Bundler
def search_up(*names)
previous = nil
- current = File.expand_path(SharedHelpers.pwd)
+ current = File.expand_path(SharedHelpers.pwd).untaint
until !File.directory?(current) || current == previous
if ENV["BUNDLE_SPEC_RUN"]