hardhat compilation with error and result fixed

pull/1342/head
aniket-engg 3 years ago committed by davidzagi93@gmail.com
parent ba01b6cf5d
commit 861acee6a1
  1. 5
      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)
})
})

Loading…
Cancel
Save