From fa883a4de89c40d152c28ee0de83ff05b40059df Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 11 Oct 2025 09:44:52 +0900 Subject: 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`. --- tool/test/test_commit_email.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tool/test/test_commit_email.rb b/tool/test/test_commit_email.rb index efd45022be..b948987ed9 100644 --- a/tool/test/test_commit_email.rb +++ b/tool/test/test_commit_email.rb @@ -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 -- cgit v1.2.3