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 11import type { ExtensionContext } from "vscode" ;
2- import { getDirectoryNamesInsidePath } from "../../common/files" ;
2+ import { getDirectoryNamesInsidePath , isIOError } from "../../common/files" ;
33import { sleep } from "../../common/time" ;
44import type { BaseLogger } from "../../common/logging" ;
55import { join } from "path" ;
@@ -109,6 +109,11 @@ export class ExtensionManagedDistributionCleaner {
109109 try {
110110 await remove ( path ) ;
111111 } catch ( e ) {
112+ if ( isIOError ( e ) && e . code === "ENOENT" ) {
113+ // If the directory doesn't exist, that's fine
114+ continue ;
115+ }
116+
112117 void this . logger . log (
113118 `Tried to clean up an old version of the CLI at ${ path } but encountered an error: ${ getErrorMessage ( e ) } .` ,
114119 ) ;
You can’t perform that action at this time.
0 commit comments