Skip to content

Commit 8adb94f

Browse files
committed
fix(cli-v3): skip MCP install prompt when --yes is set
On a fresh machine where hasSeenMCPInstallPrompt is false, the prompt at init.ts:150 fired unconditionally and would hang the --yes flow that the non-TTY guard above is meant to support. Default to CLI (skip MCP) when --yes is passed.
1 parent 4bafa7e commit 8adb94f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • packages/cli-v3/src/commands

packages/cli-v3/src/commands/init.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,10 @@ async function _initCommand(dir: string, options: InitCommandOptions) {
147147

148148
const hasSeenMCPInstallPrompt = readConfigHasSeenMCPInstallPrompt();
149149

150-
if (!hasSeenMCPInstallPrompt) {
150+
// Skip the MCP-vs-CLI prompt when --yes is set: the user explicitly chose CLI
151+
// by running `trigger.dev init` non-interactively, and the prompt would
152+
// otherwise hang on a fresh machine where `hasSeenMCPInstallPrompt` is false.
153+
if (!hasSeenMCPInstallPrompt && !options.yes) {
151154
const installChoice = await select({
152155
message: "Choose how you want to initialize your project:",
153156
options: [

0 commit comments

Comments
 (0)