We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1843467 commit ec5fe52Copy full SHA for ec5fe52
extensions/ql-vscode/src/codeql-cli/distribution/cleaner.ts
@@ -83,6 +83,15 @@ export class ExtensionManagedDistributionCleaner {
83
return;
84
}
85
86
+ // Shuffle the array so that multiple VS Code processes don't all try to clean up the same directory at the same time
87
+ for (let i = cleanableDirectories.length - 1; i > 0; i--) {
88
+ const j = Math.floor(Math.random() * (i + 1));
89
+ [cleanableDirectories[i], cleanableDirectories[j]] = [
90
+ cleanableDirectories[j],
91
+ cleanableDirectories[i],
92
+ ];
93
+ }
94
+
95
void this.logger.log(
96
`Cleaning up ${cleanableDirectories.length} old versions of the CLI.`,
97
);
0 commit comments