File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ multitask(:test) do
3636end
3737
3838xargs = %w[ xargs --no-run-if-empty --null --max-procs=0 --max-args=300 -- ]
39- locale = { "LC_ALL " => "C. UTF-8"}
39+ ruby_opt = { "RUBYOPT " => [ ENV [ "RUBYOPT" ] , "--encoding= UTF-8"] . compact . join ( " " ) }
4040
4141desc ( "Lint `*.rb(i)`" )
4242multitask ( :"lint:rubocop" ) do
@@ -64,7 +64,7 @@ desc("Format `*.rbi`")
6464multitask ( :"format:rbi" ) do
6565 find = %w[ find ./rbi -type f -and -name *.rbi -print0 ]
6666 fmt = xargs + %w[ stree write -- ]
67- sh ( locale , "#{ find . shelljoin } | #{ fmt . shelljoin } " )
67+ sh ( ruby_opt , "#{ find . shelljoin } | #{ fmt . shelljoin } " )
6868end
6969
7070desc ( "Format `*.rbs`" )
@@ -100,7 +100,7 @@ multitask(:"format:rbs") do
100100 # transform class aliases to type aliases, which syntax tree has no trouble with
101101 sh ( "#{ find . shelljoin } | #{ pre . shelljoin } " )
102102 # run syntax tree to format `*.rbs` files
103- sh ( locale , "#{ find . shelljoin } | #{ fmt . shelljoin } " ) do
103+ sh ( ruby_opt , "#{ find . shelljoin } | #{ fmt . shelljoin } " ) do
104104 success = _1
105105 end
106106 # transform type aliases back to class aliases
You can’t perform that action at this time.
0 commit comments