From 2480ef904c66812cf366e5d9bc8a9c3c20bbf271 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 20 May 2020 10:52:32 +0900 Subject: [PATCH] pure_parser.rb: get rid of an error at localed messages --- tool/pure_parser.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tool/pure_parser.rb b/tool/pure_parser.rb index d07df681be..21c87cc5d6 100755 --- a/tool/pure_parser.rb +++ b/tool/pure_parser.rb @@ -1,11 +1,14 @@ #!/usr/bin/ruby -pi.bak BEGIN { + # pathological setting + ENV['LANG'] = ENV['LC_MESSAGES'] = ENV['LC_ALL'] = 'C' + require_relative 'lib/colorize' colorize = Colorize.new file = ARGV.shift begin - version = IO.popen(ARGV+%w[--version], &:read) + version = IO.popen(ARGV+%w[--version], "rb", &:read) rescue Errno::ENOENT abort "Failed to run `#{colorize.fail ARGV.join(' ')}'; You may have to install it." end