File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
extensions/ql-vscode/src/codeql-cli/distribution Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1
1
import type { ExtensionContext } from "vscode" ;
2
- import { getDirectoryNamesInsidePath } from "../../common/files" ;
2
+ import { getDirectoryNamesInsidePath , isIOError } from "../../common/files" ;
3
3
import { sleep } from "../../common/time" ;
4
4
import type { BaseLogger } from "../../common/logging" ;
5
5
import { join } from "path" ;
@@ -109,6 +109,11 @@ export class ExtensionManagedDistributionCleaner {
109
109
try {
110
110
await remove ( path ) ;
111
111
} catch ( e ) {
112
+ if ( isIOError ( e ) && e . code === "ENOENT" ) {
113
+ // If the directory doesn't exist, that's fine
114
+ continue ;
115
+ }
116
+
112
117
void this . logger . log (
113
118
`Tried to clean up an old version of the CLI at ${ path } but encountered an error: ${ getErrorMessage ( e ) } .` ,
114
119
) ;
You can’t perform that action at this time.
0 commit comments