Cover equals-style dash-prefixed cwd parsing

Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
Cursor AgentandTheo Browne committed 2026-02-10 01:23:01 +00:00
1 parent 271d78a9a5
commit ea69ec16fe
1 file changed
+5
+5
View File
@@ -313,6 +313,11 @@ describe("parseCliOptions", () => {
expect(options.launchCwd).toBe(path.resolve("/workspace", "-project"));
});
it("accepts dash-prefixed cwd values with equals-style --cwd argument", () => {
const options = parseCliOptions(["--cwd=-project"], {}, "/workspace");
expect(options.launchCwd).toBe(path.resolve("/workspace", "-project"));
});
it("treats known flags after --cwd as missing values", () => {
expect(() => parseCliOptions(["--cwd", "--help"], {}, "/workspace")).toThrow(
"Missing value for --cwd",