From e9cbb40c3d1fc2b26fec875081c34074bec724cd Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 9 Feb 2026 23:15:09 +0000 Subject: [PATCH] Cover whitespace-only cwd flag rejection Co-authored-by: Theo Browne --- apps/t3/src/cli.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/t3/src/cli.test.ts b/apps/t3/src/cli.test.ts index 480996bf04..6988344801 100644 --- a/apps/t3/src/cli.test.ts +++ b/apps/t3/src/cli.test.ts @@ -98,6 +98,12 @@ describe("parseCliOptions", () => { ); }); + it("throws for whitespace-only cwd flag values", () => { + expect(() => parseCliOptions(["--cwd", " "], {}, "/workspace")).toThrow( + "Invalid value for --cwd", + ); + }); + it("trims cwd flag values before resolving path", () => { const options = parseCliOptions(["--cwd", " apps/renderer "], {}, "/workspace"); expect(options.launchCwd).toBe(path.resolve("apps/renderer"));