Skip to content

Commit

Permalink
Fix quote escaping bug in git-commit! (#413)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfirth authored Nov 22, 2024
1 parent e0f59fa commit 71f3586
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions private/git.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,6 @@


(define (git-commit! message)
(unless (system (format "git commit --all --quiet --message='~a'" message))
(raise-arguments-error 'git-commit-modified-files "committing files to Git failed")))
(define escaped-message (string-replace message "'" "\\'"))
(unless (system (format "git commit --all --quiet --message='~a'" escaped-message))
(raise-arguments-error 'git-commit! "committing files to Git failed")))

0 comments on commit 71f3586

Please sign in to comment.