Skip to contentSkip to conversation

t/t9001-send-email.sh: sed - remove the i flag for s

PATCH New Marcel Telka 1 participant 1 message May 17, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 t/t9001-send-email.sh: sed - remove the i flag for s

The 'i' flag for the 's' command of sed is not specified by POSIX so it is not portable. Replace its usage by different and portable syntax.

---
 t/t9001-send-email.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
t/t9001-send-email.sh +1 -1
index 5a771000c9..58699f8e4e 100755
@@ -2526,7 +2526,7 @@ test_expect_success $PREREQ 'test forbidSendmailVariables behavior override' '
 
 test_expect_success $PREREQ '--compose handles lowercase headers' '
 	write_script fake-editor <<-\EOF &&
-	sed "s/^From:.*/from: [email protected]/i" "$1" >"$1.tmp" &&
+	sed "s/^[Ff][Rr][Oo][Mm]:.*/from: [email protected]/" "$1" >"$1.tmp" &&
 	mv "$1.tmp" "$1"
 	EOF
 	clean_fake_sendmail &&