File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
packages/core/src/shared/fs Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -305,7 +305,10 @@ export class FileSystem {
305305
306306 await write ( uri )
307307 if ( isWin ( ) ) {
308- await waitUntil ( async ( ) => await fs . exists ( uri ) , { timeout : 5000 , truthy : true } )
308+ const success = await waitUntil ( async ( ) => await fs . exists ( uri ) , { timeout : 5000 , truthy : true } )
309+ if ( ! success ) {
310+ throw new ToolkitError ( `Failed to write file ${ uri . toString ( ) } ` )
311+ }
309312 }
310313 }
311314
@@ -467,7 +470,10 @@ export class FileSystem {
467470
468471 // Windows race condition
469472 if ( isWin ( ) ) {
470- await waitUntil ( async ( ) => ! ( await fs . exists ( fileOrDir ) ) , { timeout : 5000 , truthy : true } )
473+ const success = await waitUntil ( async ( ) => ! ( await fs . exists ( fileOrDir ) ) , { timeout : 5000 , truthy : true } )
474+ if ( ! success ) {
475+ throw new ToolkitError ( `Failed to delete file ${ uri . toString ( ) } ` )
476+ }
471477 }
472478 }
473479
You can’t perform that action at this time.
0 commit comments