You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
asyncfunctionmain(){if(awaitisStageEmpty()){console.log(`Nothing to commit. Stage your changes via "git add" execute "commit" again`);process.exit(1);}returnprompt();}asyncfunctionisStageEmpty(){constresult=awaitexeca('git',['diff','--cached']);returnresult.stdout==='';}
The text was updated successfully, but these errors were encountered:
@commitlint/prompt-cli
fails for empty git stages after authoring the commit message. This makes for a frustrating experience.Check if there are files in stage before entering the prompt.
Edit
The implementation for this should happen before this line: @commitlint/prompt-cli/cli.js#L21
main
could look like this:The text was updated successfully, but these errors were encountered: