nil check hardhat process before stopping

This commit is contained in:
Eric 2025-01-29 15:55:17 +11:00
parent c4f045f103
commit 69f7b95629
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