Skip to content

Commit 40d7d48

Browse files
authored
fix(cli): t3 up's retry and restart hints keep --base-dir (pingdotgg#30480)
1 parent e4ff843 commit 40d7d48

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer, NetService.layer))
221221
{
222222
label: "a failed update keeps service.env matching the old service",
223223
// The old service still runs, so no foreground server is offered.
224-
prints: "Fix that, then run `t3 up` again.",
224+
prints: "Fix that, then run `t3 up --base-dir <baseDir>` again.",
225225
installed: true,
226226
status: { current: false },
227227
installFails: true,

‎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)