diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-05-20 10:52:32 +0900 |
---|---|---|
committer | nagachika <nagachika@ruby-lang.org> | 2020-07-10 08:50:41 +0900 |
commit | 06ab2791c38c431e08bc8d9381c9a1ca727297c4 (patch) | |
tree | 84f8b8fd015a78b29eb1a8d36bddeefc4cc4df59 /tool/pure_parser.rb | |
parent | 1ee1684a4a3edb26b5aa32acc967b9ef26284d42 (diff) |
pure_parser.rb: get rid of an error at localed messages
Diffstat (limited to 'tool/pure_parser.rb')
-rwxr-xr-x | tool/pure_parser.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tool/pure_parser.rb b/tool/pure_parser.rb index 59e8fb7757..dfd66ffc84 100755 --- a/tool/pure_parser.rb +++ b/tool/pure_parser.rb @@ -1,11 +1,14 @@ #!/usr/bin/ruby -pi 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 |