aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/Homebrew/utils/homebrew_vars.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/Library/Homebrew/utils/homebrew_vars.rb b/Library/Homebrew/utils/homebrew_vars.rb
new file mode 100755
index 000000000..057633b77
--- /dev/null
+++ b/Library/Homebrew/utils/homebrew_vars.rb
@@ -0,0 +1,11 @@
+#!/usr/bin/env ruby
+
+ENV.keys.each do |key|
+ if key =~ /^HOMEBREW.*/
+ # Remove any HOMEBREW.* vars containing white-space which causes a problem for "env -i" command via string.
+ #
+ # (Any user supplied HOMEBREW.* vars with valid white-space need to be hard-coded in 'bin/brew')
+ #
+ puts "#{key}=#{ENV[key]}" unless ENV[key].split(' ').length > 1
+ end
+end