mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
feat: add Ctrl+C interrupt handling
This commit is contained in:
@@ -4,6 +4,7 @@ import fs from "fs-extra";
|
||||
import ora from "ora";
|
||||
import { setupTurso } from "./helpers/db-setup";
|
||||
import type { ProjectOptions } from "./types";
|
||||
import { logger } from "./utils/logger";
|
||||
|
||||
export async function createProject(options: ProjectOptions) {
|
||||
const spinner = ora("Creating project directory...").start();
|
||||
@@ -41,7 +42,7 @@ export async function createProject(options: ProjectOptions) {
|
||||
console.log(" bun dev");
|
||||
} catch (error) {
|
||||
spinner.fail("Failed to create project");
|
||||
console.error(error);
|
||||
logger.error("Error during project creation:", error);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user