Skip to content

Commit 0f08058

Browse files
committed
fix(cli): t3 up's retry and restart hints keep --base-dir
`t3 up --base-dir <dir>` sets up the service for that T3 home, and since #29684 its pairing hint carries the flag. Two other hints it prints still named the bare command: after a failed service update it said to run `t3 up` again, and after a declined restart it said to run `t3 service restart`. Both run against the default home, not the one being set up: the bare retry sets up the default home, and the bare restart finds no service there and restarts nothing. Both hints now resolve through resolveHostCliCommand with the same --base-dir arguments as the pairing hint. Bug: t3 up's retry and restart hints drop --base-dir
1 parent 7057e65 commit 0f08058

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,9 @@ const setUp = Effect.fn("cli.up")(function* (flags: {
367367
if ("failed" in result && before.service.installed) {
368368
// The old service still runs, so a foreground server would clash with it.
369369
yield* restoreServiceEnv;
370+
const { command } = yield* resolveHostCliCommand("up", baseDirArgs);
370371
yield* Console.log(
371-
`Service setup failed: ${result.failed} Fix that, then run \`t3 up\` again.`,
372+
`Service setup failed: ${result.failed} Fix that, then run \`${command}\` again.`,
372373
);
373374
} else if ("failed" in result) {
374375
yield* printServeCommand(`Service setup failed: ${result.failed}`);
@@ -387,7 +388,8 @@ const setUp = Effect.fn("cli.up")(function* (flags: {
387388
}),
388389
).pipe(Effect.catchTags({ QuitError: () => Effect.succeed(false) })));
389390
if (!confirmed) {
390-
yield* Console.log("Run `t3 service restart` to turn T3 Connect off.");
391+
const { command } = yield* resolveHostCliCommand("service restart", baseDirArgs);
392+
yield* Console.log(`Run \`${command}\` to turn T3 Connect off.`);
391393
} else {
392394
if (!interactive && !stopped) {
393395
yield* Console.log("Restarting T3 Code. Running agent turns will stop.");

0 commit comments

Comments
 (0)