mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
pure_parser.rb: get rid of an error at localed messages
This commit is contained in:
parent
67d259c5dc
commit
2480ef904c
1 changed files with 4 additions and 1 deletions
|
@ -1,11 +1,14 @@
|
||||||
#!/usr/bin/ruby -pi.bak
|
#!/usr/bin/ruby -pi.bak
|
||||||
BEGIN {
|
BEGIN {
|
||||||
|
# pathological setting
|
||||||
|
ENV['LANG'] = ENV['LC_MESSAGES'] = ENV['LC_ALL'] = 'C'
|
||||||
|
|
||||||
require_relative 'lib/colorize'
|
require_relative 'lib/colorize'
|
||||||
|
|
||||||
colorize = Colorize.new
|
colorize = Colorize.new
|
||||||
file = ARGV.shift
|
file = ARGV.shift
|
||||||
begin
|
begin
|
||||||
version = IO.popen(ARGV+%w[--version], &:read)
|
version = IO.popen(ARGV+%w[--version], "rb", &:read)
|
||||||
rescue Errno::ENOENT
|
rescue Errno::ENOENT
|
||||||
abort "Failed to run `#{colorize.fail ARGV.join(' ')}'; You may have to install it."
|
abort "Failed to run `#{colorize.fail ARGV.join(' ')}'; You may have to install it."
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue