From 86fcc2a949e345f197b05995219f2f1feede26f0 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 10 Feb 2026 00:21:26 +0000 Subject: [PATCH] Cover trimmed positional cwd argument parsing Co-authored-by: Theo Browne --- apps/t3/src/cli.test.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/t3/src/cli.test.ts b/apps/t3/src/cli.test.ts index 200bfd520c..792e8d1046 100644 --- a/apps/t3/src/cli.test.ts +++ b/apps/t3/src/cli.test.ts @@ -118,6 +118,11 @@ describe("parseCliOptions", () => { expect(options.launchCwd).toBe(path.resolve("apps/renderer")); }); + it("trims positional cwd arguments before resolving path", () => { + const options = parseCliOptions([" apps/renderer "], {}, "/workspace"); + expect(options.launchCwd).toBe(path.resolve("apps/renderer")); + }); + it("rejects whitespace-only positional cwd arguments", () => { expect(() => parseCliOptions([" "], {}, "/workspace")).toThrow("Invalid value for [path]"); });