mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 04:24:23 +00:00
test_commit_email.rb: Simply use sh
`env` on macOS resets DYLD environment variables that are needed to run ruby configured with `--enable-load-relative`. Use simple commands instead, and `/bin/sh` that is specified in POSIX is more portable than `/usr/bin/env`.
This commit is contained in:
parent
b868beea10
commit
fa883a4de8
Notes:
git
2025-10-11 02:02:28 +00:00
@ -20,12 +20,11 @@ class TestCommitEmail < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
@sendmail = File.join(Dir.mktmpdir, 'sendmail')
|
||||
File.write(@sendmail, <<~SENDMAIL)
|
||||
#!/usr/bin/env ruby
|
||||
print #{STDIN_DELIMITER.dump}
|
||||
puts STDIN.read
|
||||
File.write(@sendmail, <<~SENDMAIL, mode: "wx", perm: 0755)
|
||||
#!/bin/sh
|
||||
echo #{STDIN_DELIMITER.chomp.dump}
|
||||
exec cat
|
||||
SENDMAIL
|
||||
FileUtils.chmod(0755, @sendmail)
|
||||
|
||||
@commit_email = File.expand_path('../../tool/commit-email.rb', __dir__)
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user