Merge pull request #2354 from github/koesie10/clear-pack-cache-on-create

Clear pack cache on create and delete
This commit is contained in:
Koen Vlaswinkel
2023-04-20 09:51:46 +02:00
committed by GitHub

View File

@@ -707,9 +707,14 @@ async function activateWithInstalledDistribution(
for (const glob of PACK_GLOBS) {
const fsWatcher = workspace.createFileSystemWatcher(glob);
ctx.subscriptions.push(fsWatcher);
fsWatcher.onDidChange(async (_uri) => {
const clearPackCache = async (_uri: Uri) => {
await qs.clearPackCache();
});
};
fsWatcher.onDidCreate(clearPackCache);
fsWatcher.onDidChange(clearPackCache);
fsWatcher.onDidDelete(clearPackCache);
}
void extLogger.log("Initializing database manager.");