@@ -1926,7 +1926,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean, withConsole?: string) =>
1926
1926
tmpDir = fs . mkdtempSync ( path . join ( tmpdir ( ) , 'logDestTest' ) ) ;
1927
1927
} ) ;
1928
1928
suiteTeardown ( ( ) => {
1929
- rmdirRecursive ( tmpDir ) ;
1929
+ tryRmdirRecursive ( tmpDir ) ;
1930
1930
} ) ;
1931
1931
1932
1932
test ( 'logs are written to logDest file' , async function ( ) {
@@ -1998,7 +1998,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean, withConsole?: string) =>
1998
1998
} ) ;
1999
1999
2000
2000
suiteTeardown ( ( ) => {
2001
- rmdirRecursive ( tmpDir ) ;
2001
+ tryRmdirRecursive ( tmpDir ) ;
2002
2002
} ) ;
2003
2003
2004
2004
function copyDirectory ( name : string ) {
@@ -2030,13 +2030,13 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean, withConsole?: string) =>
2030
2030
} ) ;
2031
2031
2032
2032
suiteTeardown ( ( ) => {
2033
- rmdirRecursive ( goBuildOutput ) ;
2033
+ tryRmdirRecursive ( goBuildOutput ) ;
2034
2034
} ) ;
2035
2035
2036
2036
async function copyBuildDelete ( program : string ) : Promise < { program : string ; output : string } > {
2037
2037
const wd = copyDirectory ( program ) ;
2038
2038
const output = await buildGoProgram ( wd , path . join ( goBuildOutput , program ) ) ;
2039
- rmdirRecursive ( wd ) ;
2039
+ tryRmdirRecursive ( wd ) ;
2040
2040
return { program : wd , output } ;
2041
2041
}
2042
2042
@@ -2081,7 +2081,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean, withConsole?: string) =>
2081
2081
} ) ;
2082
2082
2083
2083
suiteTeardown ( ( ) => {
2084
- rmdirRecursive ( helloWorldLocal ) ;
2084
+ tryRmdirRecursive ( helloWorldLocal ) ;
2085
2085
} ) ;
2086
2086
2087
2087
test ( 'stopped for a breakpoint set during initialization using substitutePath (remote attach)' , async ( ) => {
@@ -2149,7 +2149,7 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean, withConsole?: string) =>
2149
2149
} ) ;
2150
2150
suiteTeardown ( ( ) => {
2151
2151
fs . unlinkSync ( symlinkPath ) ;
2152
- rmdirRecursive ( realPath ) ;
2152
+ tryRmdirRecursive ( realPath ) ;
2153
2153
} ) ;
2154
2154
test ( 'should stop on a breakpoint' , async function ( ) {
2155
2155
if ( ! isDlvDap ) this . skip ( ) ; // BUG: the legacy adapter fails with 'breakpoint verification mismatch' error.
@@ -2428,3 +2428,11 @@ class DelveDAPDebugAdapterOnSocket extends proxy.DelveDAPOutputAdapter {
2428
2428
function sleep ( ms : number ) {
2429
2429
return new Promise ( ( resolve ) => setTimeout ( resolve , ms ) ) ;
2430
2430
}
2431
+
2432
+ function tryRmdirRecursive ( dir : string ) {
2433
+ try {
2434
+ rmdirRecursive ( dir ) ;
2435
+ } catch ( e ) {
2436
+ console . log ( `failed to delete ${ dir } : ${ e } ` ) ;
2437
+ }
2438
+ }
0 commit comments