summaryrefslogtreecommitdiff
path: root/tool/generic_erb.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-22 08:56:30 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-22 08:56:30 +0000
commit30b839a013a347d5d474217714e313f18dbef08c (patch)
tree39344687b9e6bf8796e558a79a3fcd42382a0293 /tool/generic_erb.rb
parenta356fe1c3550892902103f66928426ac8279e072 (diff)
generic_erb.rb: ignore error
* tool/generic_erb.rb: ignore error that tput is not found. [ruby-core:71143] [Bug #11611] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/generic_erb.rb')
-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 6d97d21..149de3b 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"