diff --git a/pkg/pub_worker/lib/src/bin/pana_wrapper.dart b/pkg/pub_worker/lib/src/bin/pana_wrapper.dart index 203827375..4480cca81 100644 --- a/pkg/pub_worker/lib/src/bin/pana_wrapper.dart +++ b/pkg/pub_worker/lib/src/bin/pana_wrapper.dart @@ -167,7 +167,10 @@ Future main(List args) async { docDir: rawDartdocOutputFolder.path, ); - await rawDartdocOutputFolder.delete(recursive: true); + // existence check is needed as post-processing may delete this directory + if (rawDartdocOutputFolder.existsSync()) { + await rawDartdocOutputFolder.delete(recursive: true); + } } final _workerConfigDirectory = Directory('/home/worker/config');