diff --git a/src/exception_handler.ts b/src/exception_handler.ts index c9ccaa2..ad082f8 100644 --- a/src/exception_handler.ts +++ b/src/exception_handler.ts @@ -7,6 +7,7 @@ * file that was distributed with this source code. */ +import { errors as promptsErrors } from '@poppinss/prompts' import { errors, Kernel } from '../index.js' import { renderErrorWithSuggestions } from './helpers.js' @@ -75,6 +76,14 @@ export class ExceptionHandler { return } + /** + * Display prompt cancellation error + */ + if (error instanceof promptsErrors.E_PROMPT_CANCELLED) { + this.logError({ message: 'Process exited during prompt cancellation' }, kernel) + return + } + /** * Known errors should always be reported with a message */