Skip to content

Commit a0d81bd

Browse files
committed
fix(cli): align deprecated start help
Signed-off-by: Deepak Jain <deepujain@gmail.com>
1 parent f4574a0 commit a0d81bd

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

src/commands/simple-global-oclif-adapters.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,12 @@ describe("simple global oclif adapters", () => {
289289

290290
it("maps tunnel and deprecated service commands to service actions", async () => {
291291
await TunnelStartCommand.run([], rootDir);
292+
expect(mocks.runStartCommand).toHaveBeenCalledTimes(1);
292293
await TunnelStopCommand.run([], rootDir);
293294
await DeprecatedStartCommand.run([], rootDir);
295+
expect(mocks.runStartCommand).toHaveBeenCalledTimes(1);
294296
await DeprecatedStopCommand.run([], rootDir);
295297

296-
expect(mocks.runStartCommand).toHaveBeenCalledTimes(1);
297298
expect(mocks.runStopCommand).toHaveBeenCalledTimes(2);
298299
expect(mocks.runStartCommand).toHaveBeenCalledWith(
299300
expect.objectContaining({ listSandboxes: expect.any(Function), startAll: mocks.startAll }),

src/commands/start.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ const DEPRECATED_START_MESSAGE =
99
export default class DeprecatedStartCommand extends NemoClawCommand {
1010
static id = "start";
1111
static strict = true;
12-
static summary = "Deprecated alias for 'tunnel start'";
13-
static description = "Deprecated alias for tunnel start.";
12+
static summary = "Deprecated command that prints start migration guidance";
13+
static description =
14+
"Use 'nemoclaw <name> start' or 'nemoclaw tunnel start'; this command does not start a sandbox or public-URL tunnel.";
1415
static usage = ["start"];
1516
static examples = ["<%= config.bin %> start"];
1617
static state = "deprecated" as const;

test/cli/tunnel-command.test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@ describe("tunnel CLI dispatch", () => {
3030
expect(r.out).toContain("Start the cloudflared public-URL tunnel");
3131
});
3232

33-
it("deprecated start --help exits 0 and shows alias usage", () => {
33+
it("deprecated start --help exits 0 and describes migration-only behavior", () => {
3434
const r = run("start --help");
3535
expect(r.code).toBe(0);
36-
expect(r.out).toContain("start");
37-
expect(r.out).toContain("Deprecated alias");
36+
expect(r.out).toContain("this command does not");
37+
expect(r.out).toContain("start a sandbox or public-URL tunnel");
38+
expect(r.out).toContain("nemoclaw <name> start");
39+
expect(r.out).toContain("nemoclaw tunnel start");
3840
});
3941

4042
it("deprecated start exits 0 with sandbox-scoped migration guidance (#9303)", () => {

0 commit comments

Comments
 (0)