Skip to content

Commit 7cfcacb

Browse files
author
Akos Kitta
committed
fix: scheduled sketch deletion
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
1 parent 09697bc commit 7cfcacb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

arduino-ide-extension/src/node/sketches-service-impl.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,9 @@ export class SketchesServiceImpl
696696
const index = this.scheduledDeletions.indexOf(disposable);
697697
if (index >= 0) {
698698
this.scheduledDeletions.splice(index, 1);
699+
this.logger.info(
700+
`Removed the successfully completed scheduled sketch deletion: ${sketchPath}`
701+
);
699702
} else {
700703
this.logger.warn(
701704
`Could not find the scheduled sketch deletion: ${sketchPath}`
@@ -714,10 +717,9 @@ export class SketchesServiceImpl
714717
rmSync(sketchPath, { recursive: true, maxRetries: 5 });
715718
this.logger.info(`<<< Deleted sketch ${sketchPath}.`);
716719
} catch (err) {
717-
if (ErrnoException.isENOENT(err)) {
718-
// ignore. it does not exist
720+
if (!ErrnoException.isENOENT(err)) {
721+
throw err;
719722
}
720-
throw err;
721723
}
722724
}
723725

0 commit comments

Comments
 (0)