Handles the command.
({error, file, fileEnvVariable}: Arguments<ValidateFileOptions>)
| 52 | |
| 53 | /** Handles the command. */ |
| 54 | async function handler({error, file, fileEnvVariable}: Arguments<ValidateFileOptions>) { |
| 55 | const isErrorMode = error === null ? await getIsErrorModeDefault() : error; |
| 56 | const filePath = file || fileEnvVariable || '.git/COMMIT_EDITMSG'; |
| 57 | |
| 58 | await validateFile(filePath, isErrorMode); |
| 59 | } |
| 60 | |
| 61 | async function getIsErrorModeDefault(): Promise<boolean> { |
| 62 | return !!process.env['CI'] || !!(await getUserConfig())['commitMessage']?.errorOnInvalidMessage; |
nothing calls this directly
no test coverage detected