Skip to content

Commit 7c46916

Browse files
committed
fix: 🐛 catch global error with cli
1 parent 6ecacd8 commit 7c46916

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/cli/src/cli/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { select } from "@inquirer/prompts";
55
import pkg from "../../package.json";
66
import { generate } from "commands/generate";
77
import { init } from "commands/init";
8+
import { handleError } from "utils/handle-error";
89

910
const program = new Command();
1011

@@ -47,6 +48,7 @@ const main = async () => {
4748
process.exit(0);
4849
}
4950
}
51+
handleError(e);
5052
process.exit(1);
5153
}
5254
};

0 commit comments

Comments
 (0)