summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorColby Swandale <colby@taplaboratories.com>2017-04-12 20:20:03 +1000
committerColby Swandale <colby@taplaboratories.com>2017-04-12 20:20:03 +1000
commitb6c30144033a36c116525550ae3e13637b30f021 (patch)
treee75048286135a2e696cae37dce57ab693e02320e /lib
parent3a76965b54e6ffc7d8325241ec75204dcf5732b0 (diff)
downloadbundler-b6c30144033a36c116525550ae3e13637b30f021.tar.gz
print old config value in parseable format using overwriting an existing
value
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/cli/config.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/bundler/cli/config.rb b/lib/bundler/cli/config.rb
index 70eeac4015..8ad7f12fac 100644
--- a/lib/bundler/cli/config.rb
+++ b/lib/bundler/cli/config.rb
@@ -79,7 +79,10 @@ module Bundler
def message
locations = Bundler.settings.locations(name)
- if scope == "global"
+ if @options[:parseable]
+ value = locations[:local] || locations[:env] || locations[:global]
+ "#{name}=#{value}" if value
+ elsif scope == "global"
if locations[:local]
"Your application has set #{name} to #{locations[:local].inspect}. " \
"This will override the global value you are currently setting"