Skip to content

Commit 0bdd441

Browse files
committed
Use saveBeforeStart setting when running a variant analysis
This will respect the user's `saveBeforeStart` setting when running a variant analysis. This re-uses the existing `saveBeforeStart` function that is used when running local queries. The default behavior if the setting is not set is to save all open named files.
1 parent c459d0f commit 0bdd441

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

extensions/ql-vscode/src/variant-analysis/variant-analysis-manager.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import {
4242
processVariantAnalysisRepositoryTask,
4343
} from "./variant-analysis-processor";
4444
import PQueue from "p-queue";
45-
import { createTimestampFile } from "../run-queries-shared";
45+
import { createTimestampFile, saveBeforeStart } from "../run-queries-shared";
4646
import { readFile, remove, pathExists } from "fs-extra";
4747
import { EOL } from "os";
4848
import { cancelVariantAnalysis } from "./gh-api/gh-actions-api-client";
@@ -199,6 +199,8 @@ export class VariantAnalysisManager
199199
progress: ProgressCallback,
200200
token: CancellationToken,
201201
): Promise<void> {
202+
await saveBeforeStart();
203+
202204
progress({
203205
maxStep: 5,
204206
step: 0,

0 commit comments

Comments
 (0)