Skip to content

Commit 2480ef9

Browse files
committed
pure_parser.rb: get rid of an error at localed messages
1 parent 67d259c commit 2480ef9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tool/pure_parser.rb

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
#!/usr/bin/ruby -pi.bak
22
BEGIN {
3+
# pathological setting
4+
ENV['LANG'] = ENV['LC_MESSAGES'] = ENV['LC_ALL'] = 'C'
5+
36
require_relative 'lib/colorize'
47

58
colorize = Colorize.new
69
file = ARGV.shift
710
begin
8-
version = IO.popen(ARGV+%w[--version], &:read)
11+
version = IO.popen(ARGV+%w[--version], "rb", &:read)
912
rescue Errno::ENOENT
1013
abort "Failed to run `#{colorize.fail ARGV.join(' ')}'; You may have to install it."
1114
end

0 commit comments

Comments
 (0)