Skip to content

Commit 5d9aab7

Browse files
committed
bqrsDiff does not set retain-result-sets if option is not given
1 parent 3c80249 commit 5d9aab7

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

extensions/ql-vscode/src/codeql-cli/cli.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,8 +1276,9 @@ export class CodeQLCliServer implements Disposable {
12761276
uniquePath1,
12771277
"--right",
12781278
uniquePath2,
1279-
"--retain-result-sets",
1280-
options?.retainResultSets?.join(",") ?? "",
1279+
...(options?.retainResultSets
1280+
? ["--retain-result-sets", options.retainResultSets.join(",")]
1281+
: []),
12811282
bqrsPath1,
12821283
bqrsPath2,
12831284
],

extensions/ql-vscode/src/compare/compare-view.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,9 @@ export class CompareView extends AbstractWebview<
408408
// comparing different result sets.
409409
if (fromResultSetName === toResultSetName) {
410410
const { uniquePath1, uniquePath2, cleanup } =
411-
await this.cliServer.bqrsDiff(fromPath, toPath);
411+
await this.cliServer.bqrsDiff(fromPath, toPath, {
412+
retainResultSets: [],
413+
});
412414
try {
413415
const uniqueInfo1 = await this.cliServer.bqrsInfo(uniquePath1);
414416
const uniqueInfo2 = await this.cliServer.bqrsInfo(uniquePath2);
@@ -476,7 +478,6 @@ export class CompareView extends AbstractWebview<
476478
await this.cliServer.bqrsDiff(
477479
fromQuery.completedQuery.query.resultsPath,
478480
toQuery.completedQuery.query.resultsPath,
479-
{ retainResultSets: ["nodes", "edges", "subpaths"] },
480481
);
481482
try {
482483
const sarifOutput1 = join(path, "from.sarif");

0 commit comments

Comments
 (0)