mirror of
https://github.com/mistydemeo/tigerbrew.git
synced 2026-11-28 03:49:49 -05:00
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>
This commit is contained in:
1 parent
672696b086
commit
84a084a083
1 file changed
+1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user