From a0a2796d5186df996ced29e06bb09f7d9bff6071 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Wed, 8 Sep 2021 19:24:44 +0530 Subject: [PATCH] hardhat compilation with error and result fixed --- libs/remixd/src/services/hardhatClient.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/remixd/src/services/hardhatClient.ts b/libs/remixd/src/services/hardhatClient.ts index 217a934e2d..b62258251a 100644 --- a/libs/remixd/src/services/hardhatClient.ts +++ b/libs/remixd/src/services/hardhatClient.ts @@ -37,10 +37,11 @@ export class HardhatClient extends PluginClient { result += msg + '\n' }) child.stderr.on('data', (err) => { - error += `[Hardhat Compilation]: ${err.toString()}` + error += `[Hardhat Compilation]: ${err.toString()} \n` }) child.on('close', () => { - if (error) reject(error) + if (error && result) resolve(error + result) + else if (error) reject(error) else resolve(result) }) })