nil check hardhat process before stopping

This commit is contained in:
Eric 2025-01-29 15:55:17 +11:00
parent 943b552e5f
commit 2bbf903062
No known key found for this signature in database

View File

@ -572,6 +572,7 @@ proc stop*(manager: TestManager) {.async: (raises: [CancelledError]).} =
for hardhat in manager.hardhats:
try:
await hardhat.process.stop()
if not hardhat.process.isNil:
await hardhat.process.stop()
except CatchableError as e:
trace "failed to stop hardhat node", error = e.msg