From b672b44cf9d60738276c137a064b31e68572e196 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Mon, 19 Aug 2013 17:21:13 -0500 Subject: [PATCH] Add ENV.append_path --- Library/Homebrew/extend/ENV/shared.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Library/Homebrew/extend/ENV/shared.rb b/Library/Homebrew/extend/ENV/shared.rb index 74b48d9de4..ca92c1574a 100644 --- a/Library/Homebrew/extend/ENV/shared.rb +++ b/Library/Homebrew/extend/ENV/shared.rb @@ -35,9 +35,15 @@ module SharedEnvExtension end end end + + def append_path key, path + append key, path, File::PATH_SEPARATOR if File.directory? path + end + def prepend_path key, path prepend key, path, File::PATH_SEPARATOR if File.directory? path end + def remove keys, value Array(keys).each do |key| next unless self[key]