Skip to content

Commit fbe782f

Browse files
authored
Merge pull request github#2354 from github/koesie10/clear-pack-cache-on-create
Clear pack cache on create and delete
2 parents 2741827 + 686a9e4 commit fbe782f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

extensions/ql-vscode/src/extension.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -707,9 +707,14 @@ async function activateWithInstalledDistribution(
707707
for (const glob of PACK_GLOBS) {
708708
const fsWatcher = workspace.createFileSystemWatcher(glob);
709709
ctx.subscriptions.push(fsWatcher);
710-
fsWatcher.onDidChange(async (_uri) => {
710+
711+
const clearPackCache = async (_uri: Uri) => {
711712
await qs.clearPackCache();
712-
});
713+
};
714+
715+
fsWatcher.onDidCreate(clearPackCache);
716+
fsWatcher.onDidChange(clearPackCache);
717+
fsWatcher.onDidDelete(clearPackCache);
713718
}
714719

715720
void extLogger.log("Initializing database manager.");

0 commit comments

Comments
 (0)