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
36
36
end
37
37
38
38
xargs = %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 ( " " ) }
40
40
41
41
desc ( "Lint `*.rb(i)`" )
42
42
multitask ( :"lint:rubocop" ) do
@@ -64,7 +64,7 @@ desc("Format `*.rbi`")
64
64
multitask ( :"format:rbi" ) do
65
65
find = %w[ find ./rbi -type f -and -name *.rbi -print0 ]
66
66
fmt = xargs + %w[ stree write -- ]
67
- sh ( locale , "#{ find . shelljoin } | #{ fmt . shelljoin } " )
67
+ sh ( ruby_opt , "#{ find . shelljoin } | #{ fmt . shelljoin } " )
68
68
end
69
69
70
70
desc ( "Format `*.rbs`" )
@@ -100,7 +100,7 @@ multitask(:"format:rbs") do
100
100
# transform class aliases to type aliases, which syntax tree has no trouble with
101
101
sh ( "#{ find . shelljoin } | #{ pre . shelljoin } " )
102
102
# run syntax tree to format `*.rbs` files
103
- sh ( locale , "#{ find . shelljoin } | #{ fmt . shelljoin } " ) do
103
+ sh ( ruby_opt , "#{ find . shelljoin } | #{ fmt . shelljoin } " ) do
104
104
success = _1
105
105
end
106
106
# transform type aliases back to class aliases
You can’t perform that action at this time.
0 commit comments