diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2017-06-14 10:01:25 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2017-06-14 16:09:40 -0500 |
commit | eb1ba073c87763a7c44224079913d75f761ef4ce (patch) | |
tree | fe1ec10684c736d3046e4fb68431df86e76c5194 | |
parent | 1f39ea35973c9eb8879efe29b7971e4c8f8171d8 (diff) | |
download | bundler-eb1ba073c87763a7c44224079913d75f761ef4ce.tar.gz |
[Settings] Require the local config file before emitting deprecations
-rw-r--r-- | lib/bundler/settings.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb index 7857e00ea0..5370b4c3d5 100644 --- a/lib/bundler/settings.rb +++ b/lib/bundler/settings.rb @@ -76,6 +76,8 @@ module Bundler end def []=(key, value) + local_config_file || raise(GemfileNotFound, "Could not locate Gemfile") + if cli_flags_given command = if value.nil? "bundle config --delete #{key}" @@ -89,7 +91,7 @@ module Bundler "you want remembered between commands using `bundle config " \ "<setting name> <setting value>`, i.e. `#{command}`" end - local_config_file || raise(GemfileNotFound, "Could not locate Gemfile") + set_key(key, value, @local_config, local_config_file) end alias_method :set_local, :[]= |