Skip to content

Commit c01bd5a

Browse files
Benabikgitster
authored andcommitted
t/annotate-tests: Use echo & cat instead of sed
The use of the sed command "1i No robots allowed" caused the version of sed in OS X to die with sed: 1: "1i "No robots allowed"\n": command i expects \ followed by text Since this command was just trying to add a single line to the beginning of the file, do the same with "echo" followed by "cat". Unbreaks t8001 and t8002 on OS X 10.6.7 Signed-off-by: Brian Gernhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9b01f00 commit c01bd5a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

t/annotate-tests.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ test_expect_success \
127127

128128
test_expect_success \
129129
'an obfuscated email added' \
130-
'sed -e "1i No robots allowed" < file > file.new &&
130+
'echo "No robots allowed" > file.new &&
131+
cat file >> file.new &&
131132
mv file.new file &&
132133
GIT_AUTHOR_NAME="E" GIT_AUTHOR_EMAIL="E at test dot git" git commit -a -m "norobots"'
133134

0 commit comments

Comments
 (0)