aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/extend')
-rw-r--r--Library/Homebrew/extend/ENV.rb7
-rw-r--r--Library/Homebrew/extend/ENV/std.rb1
-rw-r--r--Library/Homebrew/extend/ENV/super.rb4
-rw-r--r--Library/Homebrew/extend/os/mac/diagnostic.rb2
-rw-r--r--Library/Homebrew/extend/pathname.rb6
5 files changed, 11 insertions, 9 deletions
diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb
index 729598e28..283e90b69 100644
--- a/Library/Homebrew/extend/ENV.rb
+++ b/Library/Homebrew/extend/ENV.rb
@@ -26,6 +26,13 @@ module EnvActivation
ensure
replace(old_env)
end
+
+ def clear_sensitive_environment!
+ ENV.keys.each do |key|
+ next unless /(cookie|key|token)/i =~ key
+ ENV.delete key
+ end
+ end
end
ENV.extend(EnvActivation)
diff --git a/Library/Homebrew/extend/ENV/std.rb b/Library/Homebrew/extend/ENV/std.rb
index 403ea1978..aafc0a451 100644
--- a/Library/Homebrew/extend/ENV/std.rb
+++ b/Library/Homebrew/extend/ENV/std.rb
@@ -1,7 +1,6 @@
require "hardware"
require "extend/ENV/shared"
-# TODO: deprecate compiling related codes after it's only used by brew test.
# @private
module Stdenv
include SharedEnvExtension
diff --git a/Library/Homebrew/extend/ENV/super.rb b/Library/Homebrew/extend/ENV/super.rb
index 0935647f5..4d6d96ad3 100644
--- a/Library/Homebrew/extend/ENV/super.rb
+++ b/Library/Homebrew/extend/ENV/super.rb
@@ -326,9 +326,7 @@ module Superenv
def set_x11_env_if_installed
end
- # This method does nothing in superenv since there's no custom CFLAGS API
- # @private
- def set_cpu_flags(*_args)
+ def set_cpu_flags(*)
end
end
diff --git a/Library/Homebrew/extend/os/mac/diagnostic.rb b/Library/Homebrew/extend/os/mac/diagnostic.rb
index fb6b30836..ff936c75a 100644
--- a/Library/Homebrew/extend/os/mac/diagnostic.rb
+++ b/Library/Homebrew/extend/os/mac/diagnostic.rb
@@ -263,7 +263,7 @@ module Homebrew
SSL_CERT_DIR support was removed from Apple's curl.
If fetching formulae fails you should:
unset SSL_CERT_DIR
- and remove it from #{Utils::Shell.shell_profile} if present.
+ and remove it from #{Utils::Shell.profile} if present.
EOS
end
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb
index eb254c624..c413e9e94 100644
--- a/Library/Homebrew/extend/pathname.rb
+++ b/Library/Homebrew/extend/pathname.rb
@@ -331,7 +331,6 @@ class Pathname
raise ChecksumMismatchError.new(self, expected, actual) unless expected == actual
end
- # FIXME: eliminate the places where we rely on this method
alias to_str to_s unless method_defined?(:to_str)
def cd
@@ -365,9 +364,8 @@ class Pathname
unless method_defined?(:/)
def /(other)
- unless other.respond_to?(:to_str) || other.respond_to?(:to_path)
- opoo "Pathname#/ called on #{inspect} with #{other.inspect} as an argument"
- puts "This behavior is deprecated, please pass either a String or a Pathname"
+ if !other.respond_to?(:to_str) && !other.respond_to?(:to_path)
+ odeprecated "Pathname#/ with #{other.class}", "a String or a Pathname"
end
self + other.to_s
end