summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-08-30 14:15:41 -0500
committerSamuel Giddins <segiddins@segiddins.me>2017-09-08 10:46:55 -0700
commit10bc341c6166f281c81c13d33e851a5d138a8a7d (patch)
treef9813d542222cb312d4c51131889c6064391ab15
parent0d25590168d352aaaf93a7ce9b66e67a5843b39d (diff)
downloadbundler-10bc341c6166f281c81c13d33e851a5d138a8a7d.tar.gz
[CLI::Common] Handle when setting a nil path
-rw-r--r--lib/bundler/cli/common.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/bundler/cli/common.rb b/lib/bundler/cli/common.rb
index 2edae86d05..bfd653e821 100644
--- a/lib/bundler/cli/common.rb
+++ b/lib/bundler/cli/common.rb
@@ -100,7 +100,10 @@ module Bundler
end
def self.set_path(path, if_given = false)
- return if if_given && path.nil?
+ if path.nil?
+ Bundler.settings.set_command_option :path, nil unless if_given
+ return
+ end
path = Pathname.new(path)
if path.relative? && Bundler.feature_flag.path_relative_to_cwd?