aboutsummaryrefslogtreecommitdiffstats
path: root/tool
diff options
context:
space:
mode:
Diffstat (limited to 'tool')
-rw-r--r--tool/generic_erb.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/generic_erb.rb b/tool/generic_erb.rb
index 6d97d21fb7..149de3b1b9 100644
--- a/tool/generic_erb.rb
+++ b/tool/generic_erb.rb
@@ -24,7 +24,7 @@ end
unchanged = "unchanged"
updated = "updated"
if color or (color == nil && STDOUT.tty?)
- if /\A(\e\[).*m\z/ =~ IO.popen("tput smso", "r", &:read)
+ if (/\A(\e\[).*m\z/ =~ IO.popen("tput smso", "r", err: IO::NULL, &:read) rescue nil)
beg = $1
colors = (colors = ENV['TEST_COLORS']) ? Hash[colors.scan(/(\w+)=([^:\n]*)/)] : {}
reset = "#{beg}m"