From 2bf41ad01c3a223d4c6808ce0ffd659643530537 Mon Sep 17 00:00:00 2001 From: Samuel Giddins Date: Sat, 24 Dec 2016 18:21:04 +0100 Subject: [Settings] Don't try to access config file when it is ignored --- lib/bundler/settings.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb index 149beddf52..35ad17ae43 100644 --- a/lib/bundler/settings.rb +++ b/lib/bundler/settings.rb @@ -303,10 +303,10 @@ module Bundler }xo def load_config(config_file) - return {} unless config_file + return {} if !config_file || ignore_config? SharedHelpers.filesystem_access(config_file, :read) do |file| valid_file = file.exist? && !file.size.zero? - return {} if ignore_config? || !valid_file + return {} unless valid_file require "bundler/yaml_serializer" YAMLSerializer.load file.read end -- cgit v1.2.1