Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(prompt): modify the entry point to pass commitizen's function check #2501

Merged
merged 3 commits into from
Mar 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions @commitlint/prompt/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ type Commit = (input: string) => void;
* Entry point for commitizen
* @param _ inquirer instance passed by commitizen, unused
* @param commit callback to execute with complete commit message
* @return generated commit message
* @return {void}
*/
export async function prompter(_: unknown, commit: Commit): Promise<void> {
const message = await input(vorpal);
commit(message);
export function prompter(_: unknown, commit: Commit): void {
input(vorpal).then((message) => {
commit(message);
});
}