mirror of
https://github.com/status-im/nim-codex.git
synced 2025-01-31 21:16:09 +00:00
fail early with message when hardhat binary not found
# Conflicts: # tests/integration/hardhatprocess.nim
This commit is contained in:
parent
4790b54fd2
commit
5b491b3705
@ -8,6 +8,7 @@ import pkg/stew/io2
|
||||
import std/os
|
||||
import std/sets
|
||||
import std/sequtils
|
||||
import std/strformat
|
||||
import std/strutils
|
||||
import pkg/codex/conf
|
||||
import pkg/codex/utils/trackedfutures
|
||||
@ -58,6 +59,14 @@ proc openLogFile(node: HardhatProcess, logFilePath: string): IoHandle =
|
||||
return fileHandle
|
||||
|
||||
method start*(node: HardhatProcess) {.async.} =
|
||||
logScope:
|
||||
nodeName = node.name
|
||||
|
||||
if not fileExists(node.executable):
|
||||
raiseAssert "cannot start hardhat, binary doesn't exist (looking for " &
|
||||
&"{absolutePath(node.workingDir / node.executable)}). Try running " &
|
||||
&"`npm install` in {node.workingDir}."
|
||||
|
||||
let poptions = node.processOptions + {AsyncProcessOption.StdErrToStdOut}
|
||||
trace "starting node",
|
||||
args = node.arguments,
|
||||
|
Loading…
x
Reference in New Issue
Block a user