There was an error while loading. Please reload this page.
1 parent 609fb65 commit 0b69990Copy full SHA for 0b69990
1 file changed
crates/forge_app/src/git_app.rs
@@ -154,8 +154,10 @@ where
154
155
// Set ForgeCode as the committer while keeping the user as the author
156
// by prefixing the command with environment variables
157
+ // Escape single quotes in the message by replacing ' with '\''
158
+ let escaped_message = message.replace('\'', r"'\''");
159
let commit_command = format!(
- "GIT_COMMITTER_NAME='ForgeCode' GIT_COMMITTER_EMAIL='noreply@forgecode.dev' git commit {flags} -m '{message}'"
160
+ "GIT_COMMITTER_NAME='ForgeCode' GIT_COMMITTER_EMAIL='noreply@forgecode.dev' git commit {flags} -m '{escaped_message}'"
161
);
162
163
let commit_result = self
0 commit comments