mirror of
https://github.com/status-im/nim-codex.git
synced 2025-02-08 00:44:53 +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/os
|
||||||
import std/sets
|
import std/sets
|
||||||
import std/sequtils
|
import std/sequtils
|
||||||
|
import std/strformat
|
||||||
import std/strutils
|
import std/strutils
|
||||||
import pkg/codex/conf
|
import pkg/codex/conf
|
||||||
import pkg/codex/utils/trackedfutures
|
import pkg/codex/utils/trackedfutures
|
||||||
@ -58,6 +59,14 @@ proc openLogFile(node: HardhatProcess, logFilePath: string): IoHandle =
|
|||||||
return fileHandle
|
return fileHandle
|
||||||
|
|
||||||
method start*(node: HardhatProcess) {.async.} =
|
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}
|
let poptions = node.processOptions + {AsyncProcessOption.StdErrToStdOut}
|
||||||
trace "starting node",
|
trace "starting node",
|
||||||
args = node.arguments,
|
args = node.arguments,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user