summaryrefslogtreecommitdiff
path: root/lib/bundler/settings.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/settings.rb')
-rw-r--r--lib/bundler/settings.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index a58265e030..bd98616c3a 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -108,6 +108,8 @@ module Bundler
end
def set_local(key, value)
+ local_config_file || raise(GemfileNotFound, "Could not locate Gemfile")
+
set_key(key, value, @local_config, local_config_file)
end
@@ -384,7 +386,7 @@ module Bundler
end
def local_config_file
- @root.join("config")
+ @root.join("config") if @root
end
def load_config(config_file)