use workspace storage location instead of global storage location (#232596)

pull/232616/head
Sandeep Somavarapu 2024-10-30 15:00:32 +01:00 committed by GitHub
parent a3e0ecec10
commit 4b601b0fcf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 6 deletions

View File

@ -86,10 +86,11 @@ export async function activate(context: vscode.ExtensionContext) {
}, uri => ctrl.items.get(uri.toString().toLowerCase()));
ctrl.relatedCodeProvider = graph;
context.subscriptions.push(
new FailureTracker(context, folder.uri.fsPath),
fileChangedEmitter.event(e => graph.didChange(e.uri, e.removed)),
);
if (context.storageUri) {
context.subscriptions.push(new FailureTracker(context.storageUri.fsPath, folder.uri.fsPath));
}
context.subscriptions.push(fileChangedEmitter.event(e => graph.didChange(e.uri, e.removed)));
});
const createRunHandler = (

View File

@ -33,8 +33,8 @@ export class FailureTracker {
private readonly logFile: string;
private logs?: ITrackedRemediation[];
constructor(context: vscode.ExtensionContext, private readonly rootDir: string) {
this.logFile = join(context.globalStorageUri.fsPath, '.build/vscode-test-failures.json');
constructor(storageLocation: string, private readonly rootDir: string) {
this.logFile = join(storageLocation, '.build/vscode-test-failures.json');
mkdirSync(dirname(this.logFile), { recursive: true });
const oldLogFile = join(rootDir, '.build/vscode-test-failures.json');