feat(commands): trim body, footer (#24)

This commit is contained in:
2024-05-19 02:49:18 +03:00
parent a576725506
commit e8160a6f33

View File

@@ -269,15 +269,17 @@ const command = new Command("commit")
// Stop clack input // Stop clack input
process.stdin.pause(); process.stdin.pause();
body = await getEditorInput( body = (
`e.g. await getEditorInput(
`e.g.
* Revert "Guard against SMTP smuggling", commit faf23f1, by restoring the setting to its default. * Revert "Guard against SMTP smuggling", commit faf23f1, by restoring the setting to its default.
* Revert "[security] SMTP smuggling: update short term fix (#2346)", commmit e931e10, by restoring the setting to its default. * Revert "[security] SMTP smuggling: update short term fix (#2346)", commmit e931e10, by restoring the setting to its default.
* Set smtpd_forbid_bare_newline=normalize. * Set smtpd_forbid_bare_newline=normalize.
Fixes #444 Fixes #444
`, `,
); )
).trim();
// Resume clack input // Resume clack input
process.stdin.resume(); process.stdin.resume();
@@ -296,11 +298,13 @@ Fixes #444
if (writeFooter) { if (writeFooter) {
process.stdin.pause(); process.stdin.pause();
footer = await getEditorInput( footer = (
`e.g. await getEditorInput(
`e.g.
Co-authored-by: @john Co-authored-by: @john
`, `,
); )
).trim();
process.stdin.resume(); process.stdin.resume();
} }