Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(prompt): modify the entry point to pass commitizen's function che…
…ck (#2501)

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

Async Function type cannot be verified by commitizen's function check, modify to Function type.

issue: #2486 (comment)

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

Async Function type cannot be verified by commitizen's function check, modify to Function type.

issue: #2486 (comment)

Co-authored-by: curly <water.curly@gmail.com>
  • Loading branch information
curly210102 and curly committed Mar 11, 2021
1 parent b59c733 commit 0173fb7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions @commitlint/prompt/src/index.ts
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);
});
}

0 comments on commit 0173fb7

Please sign in to comment.