Skip to content
TypeScript

fix(cli): t3 up's retry and restart hints keep --base-dir (#30480)

spoukyii40d7d48a889c
diff --git a/apps/server/src/cli/up.test.ts b/apps/server/src/cli/up.test.ts
index 10fb3b421d2..fb1e88fc61e 100644
--- a/apps/server/src/cli/up.test.ts
+++ b/apps/server/src/cli/up.test.ts
@@ -221,7 +221,7 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer, NetService.layer))
{
label: "a failed update keeps service.env matching the old service",
// The old service still runs, so no foreground server is offered.
- prints: "Fix that, then run `t3 up` again.",
+ prints: "Fix that, then run `t3 up --base-dir <baseDir>` again.",
installed: true,
status: { current: false },
installFails: true,
diff --git a/apps/server/src/cli/up.ts b/apps/server/src/cli/up.ts
index 5a0e820958c..318a2849a6d 100644
--- a/apps/server/src/cli/up.ts
+++ b/apps/server/src/cli/up.ts
@@ -367,8 +367,9 @@ const setUp = Effect.fn("cli.up")(function* (flags: {
if ("failed" in result && before.service.installed) {
// The old service still runs, so a foreground server would clash with it.
yield* restoreServiceEnv;
+ const { command } = yield* resolveHostCliCommand("up", baseDirArgs);
yield* Console.log(
- `Service setup failed: ${result.failed} Fix that, then run \`t3 up\` again.`,
+ `Service setup failed: ${result.failed} Fix that, then run \`${command}\` again.`,
);
} else if ("failed" in result) {
yield* printServeCommand(`Service setup failed: ${result.failed}`);
@@ -387,7 +388,8 @@ const setUp = Effect.fn("cli.up")(function* (flags: {
}),
).pipe(Effect.catchTags({ QuitError: () => Effect.succeed(false) })));
if (!confirmed) {
- yield* Console.log("Run `t3 service restart` to turn T3 Connect off.");
+ const { command } = yield* resolveHostCliCommand("service restart", baseDirArgs);
+ yield* Console.log(`Run \`${command}\` to turn T3 Connect off.`);
} else {
if (!interactive && !stopped) {
yield* Console.log("Restarting T3 Code. Running agent turns will stop.");