diff options
| author | Jack Nagel | 2012-08-14 19:33:16 -0500 |
|---|---|---|
| committer | Jack Nagel | 2012-08-23 22:29:56 -0500 |
| commit | a4fbae274f9bbb426419af489efa0f89d1fb7038 (patch) | |
| tree | 798c6def6beec4b2adb873817306df9c6156fa6c | |
| parent | f069ebd0df00cd91cad81976450d34d668fadca0 (diff) | |
| download | brew-a4fbae274f9bbb426419af489efa0f89d1fb7038.tar.bz2 | |
Compact whitespace when removing flags
This prevents multiple calls to flag-modifying ENV methods from
resulting in large amounts of consecutive spaces.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
| -rw-r--r-- | Library/Homebrew/extend/ENV.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb index 4c6c5fd47..fd87ffeea 100644 --- a/Library/Homebrew/extend/ENV.rb +++ b/Library/Homebrew/extend/ENV.rb @@ -409,6 +409,7 @@ Please take one of the following actions: [*key].each do |key| next if self[key].nil? self[key] = self[key].sub value, '' # can't use sub! on ENV + self[key] = self[key].gsub /\s+/, ' ' # compact whitespace self[key] = nil if self[key].empty? # keep things clean end end |
