Skip to content

Commit 9196b6b

Browse files
fix(server): t3 serve no longer offers --auto-bootstrap-project-from-cwd
Serve always starts headless and never bootstraps a project, but it reused the shared server flags, so its help listed the flag and silently ignored it. Serve now drops the flag from its flag set, so help no longer lists it and passing it fails as an unrecognized flag. Fixes #34223 AI-assisted; verified with the tests and tools listed above.
1 parent 38228ff commit 9196b6b

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

‎apps/server/src/cli/server.ts‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,21 @@ export const startCommand = Command.make("start", { ...sharedServerCommandFlags
8787
Command.withHandler((flags) => runServerCommand(flags, { rejectRunningServer: true })),
8888
);
8989

90-
export const serveCommand = Command.make("serve", { ...sharedServerCommandFlags }).pipe(
90+
// Serve never bootstraps a project, so it does not offer the flag that asks for one.
91+
const { autoBootstrapProjectFromCwd: _, ...serveCommandFlags } = sharedServerCommandFlags;
92+
93+
export const serveCommand = Command.make("serve", serveCommandFlags).pipe(
9194
Command.withShortDescription("Run T3 Code in this terminal, with no browser."),
9295
Command.withDescription(
9396
"Run T3 Code in this terminal without opening a browser, and print pairing details. The background service runs this. To set up access from your other devices, run `t3 up`.",
9497
),
9598
Command.withHandler((flags) =>
96-
runServerCommand(flags, {
97-
startupPresentation: "headless",
98-
forceAutoBootstrapProjectFromCwd: false,
99-
}),
99+
runServerCommand(
100+
{ ...flags, autoBootstrapProjectFromCwd: Option.none() },
101+
{
102+
startupPresentation: "headless",
103+
forceAutoBootstrapProjectFromCwd: false,
104+
},
105+
),
100106
),
101107
);

0 commit comments

Comments
 (0)