diff --git a/libs/remixd/src/services/slitherClient.ts b/libs/remixd/src/services/slitherClient.ts index 2399dabe61..09c256be08 100644 --- a/libs/remixd/src/services/slitherClient.ts +++ b/libs/remixd/src/services/slitherClient.ts @@ -149,13 +149,9 @@ export class SlitherClient extends PluginClient { if (existsSync(outputFileAbsPath)) { let report = readFileSync(outputFileAbsPath, 'utf8') report = JSON.parse(report) - try { - unlink(outputFileAbsPath, (err) => { - console.log(err) - }) - } catch (e) { - console.log(e) - } + unlink(outputFileAbsPath, (err) => { + if (err) console.log(err) + }) if (report['success']) { response['status'] = true if (!report['results'] || !report['results'].detectors || !report['results'].detectors.length) {