RomanHotsiy / commitgpt

Automatically generate commit messages using ChatGPT
1.56k stars 91 forks source link

error: commit message has single quote #12

Closed jimmyhealer closed 1 year ago

jimmyhealer commented 1 year ago

I'm using this tool in WSL2.

Got the some error:

✔ Pick a message · feat: implement dijkstra's algorithm
/bin/sh: 1: Syntax error: Unterminated quoted string
Aborted.
Error: Command failed: git commit -m 'feat: implement dijkstra\'s algorithm'
    at checkExecSyncError (node:child_process:828:11)
    at execSync (node:child_process:899:15)
    at file:///home/jimmyhealer/.npm/_npx/de3899c053a47706/node_modules/commitgpt/dist/index.js:122:25
    at step (file:///home/jimmyhealer/.npm/_npx/de3899c053a47706/node_modules/commitgpt/dist/index.js:33:23)
    at Object.next (file:///home/jimmyhealer/.npm/_npx/de3899c053a47706/node_modules/commitgpt/dist/index.js:14:53)
    at fulfilled (file:///home/jimmyhealer/.npm/_npx/de3899c053a47706/node_modules/commitgpt/dist/index.js:5:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  status: 2,
  signal: null,
  output: [ null, null, null ],
  pid: 2295,
  stdout: null,
  stderr: null
}
Error: Command failed: git commit -m 'feat: implement dijkstra\'s algorithm'

This command fails because the backslash does not successfully escape the character.