Skip to content

Commit 977e289

Browse files
drafnelgitster
authored andcommitted
t/t9001-send-email.sh: ensure generated script is executed with $SHELL_PATH
If the shell is not specified using the '#!' notation, then the OS will use '/bin/sh' to execute the script which may not produce the desired results. In particular, /bin/sh on Solaris interprets '^' specially which has an effect on the sed command that this patch touches. Signed-off-by: Brandon Casey <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cb8a9bd commit 977e289

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

t/t9001-send-email.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,10 @@ test_expect_success 'cccmd works' '
152152
clean_fake_sendmail &&
153153
cp $patches cccmd.patch &&
154154
echo [email protected] >>cccmd.patch &&
155-
echo sed -n s/^cccmd--//p \"\$1\" > cccmd-sed &&
155+
{
156+
echo "#!$SHELL_PATH"
157+
echo sed -n -e s/^cccmd--//p \"\$1\"
158+
} > cccmd-sed &&
156159
chmod +x cccmd-sed &&
157160
git send-email \
158161
--from="Example <[email protected]>" \

0 commit comments

Comments
 (0)