From 11f315834ed4990050b1eebaf59e81eaf99cd337 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sun, 25 Mar 2018 09:43:39 +0100 Subject: [PATCH] system_config: never display default_hash keys. Otherwise you can end up with duplicate outputs. --- Library/Homebrew/system_config.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/system_config.rb b/Library/Homebrew/system_config.rb index 341be88fde..13867e7d4e 100644 --- a/Library/Homebrew/system_config.rb +++ b/Library/Homebrew/system_config.rb @@ -200,10 +200,13 @@ class SystemConfig if defaults_hash[:HOMEBREW_CELLAR] != HOMEBREW_CELLAR.to_s f.puts "HOMEBREW_CELLAR: #{HOMEBREW_CELLAR}" end + if defaults_hash[:HOMEBREW_CACHE] != HOMEBREW_CACHE.to_s + f.puts "HOMEBREW_CACHE: #{HOMEBREW_CACHE}" + end ENV.sort.each do |key, value| next unless key.start_with?("HOMEBREW_") next if boring_keys.include?(key) - next if defaults_hash[key.to_sym] == value + next if defaults_hash[key.to_sym] value = "set" if key =~ /(cookie|key|token|password)/i f.puts "#{key}: #{value}" end