Use absolute path for binary when checking for existence

This commit is contained in:
Eric 2025-01-21 12:42:48 +11:00
parent 5b491b3705
commit 111fd90498
No known key found for this signature in database

View File

@ -62,10 +62,10 @@ method start*(node: HardhatProcess) {.async.} =
logScope: logScope:
nodeName = node.name nodeName = node.name
if not fileExists(node.executable): let binary = absolutePath(node.workingDir / node.executable)
if not fileExists(binary):
raiseAssert "cannot start hardhat, binary doesn't exist (looking for " & raiseAssert "cannot start hardhat, binary doesn't exist (looking for " &
&"{absolutePath(node.workingDir / node.executable)}). Try running " & &"{binary}). Try running `npm install` in {node.workingDir}."
&"`npm install` in {node.workingDir}."
let poptions = node.processOptions + {AsyncProcessOption.StdErrToStdOut} let poptions = node.processOptions + {AsyncProcessOption.StdErrToStdOut}
trace "starting node", trace "starting node",