I have been using shell js to execute a git command in a node js file as follows:
if (shell.exec(`git commit -m "${messageEmoji} ${messageType} : ${commitMsg}"`).code !== 0) {
console.log('Error: Git commit failed');
exit(1);
}
However it keeps exiting with status code 1. How do I execute it then?
I have already tried running it through the commands mentioned in docs. p.s. : my OS is windows 10