Skip to content

Commit

Permalink
Handling ctrl+c gracefully
Browse files Browse the repository at this point in the history
  • Loading branch information
gziolo committed Dec 18, 2024
1 parent 26552cf commit f5c8e69
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 82 deletions.
6 changes: 5 additions & 1 deletion packages/create-block/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ program
targetDir,
}
) => {
await checkSystemRequirements( engines );
try {
await checkSystemRequirements( engines );

const projectTemplate =
await getProjectTemplate( templateName );
const availableVariants = Object.keys(
Expand Down Expand Up @@ -198,6 +199,9 @@ program
if ( error instanceof CLIError ) {
log.error( error.message );
process.exit( 1 );
} else if ( error.name === 'ExitPromptError' ) {
log.info( 'Please try again later!' );
process.exit( 1 );
} else {
throw error;
}
Expand Down
81 changes: 0 additions & 81 deletions x.diff

This file was deleted.

0 comments on commit f5c8e69

Please sign in to comment.