From 9c7637e0d50dceb0d7335fc7afd3c77381c3829c Mon Sep 17 00:00:00 2001 From: Corbin Crutchley Date: Mon, 10 Aug 2026 23:00:50 -0700 Subject: [PATCH] chore: fix devCmd --- packages/compiler/bin/tempblot.ts | 7 +++++++ packages/compiler/tests/bin.spec.ts | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/compiler/bin/tempblot.ts b/packages/compiler/bin/tempblot.ts index a8fdd43..5be947c 100755 --- a/packages/compiler/bin/tempblot.ts +++ b/packages/compiler/bin/tempblot.ts @@ -17,6 +17,13 @@ const args = parse(argv, { string: ["url"], }); +const [command] = args._; + +if (command !== getCmd.value) { + console.error(`Usage: tempblot ${getCmd.value} [--url ]`); + process.exit(1); +} + const url = args.url || ((await text({ diff --git a/packages/compiler/tests/bin.spec.ts b/packages/compiler/tests/bin.spec.ts index dc61496..9a48200 100644 --- a/packages/compiler/tests/bin.spec.ts +++ b/packages/compiler/tests/bin.spec.ts @@ -63,7 +63,15 @@ test("the packed binary runs outside the project", async () => { mkdirSync(dirname(installedBinary), { recursive: true }); symlinkSync(binaryPath, installedBinary); - const cli = await render(installedBinary, [], { + const invalidCommandCli = await render(installedBinary, ["compile"], { + cwd: join(temporaryRoot, "consumer"), + }); + + expect( + await invalidCommandCli.findByError("Usage: tempblot get"), + ).toHaveErrorMessage("Usage: tempblot get [--url ]"); + + const cli = await render(installedBinary, ["get"], { cwd: join(temporaryRoot, "consumer"), }); -- 2.51.2