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"));