Commit 3e31ea4f authored by Karl Bartel's avatar Karl Bartel Committed by GitHub

Makefile: Fix executable command detection (#12080)

`$(command -v geth)` is valid shell syntax, but it gets processed by
make first, so that this never gets correctly executed by the shell. As
a result, `make install-geth` and `make install-eth2-testnet-genesis`
are always executed and not, as intended, just when the commands are not
present.

The fix is easy: escape the dollar by duplicating it, so that make won't
do anything and the correct command reaches the shell.
parent 71fd6704
......@@ -173,10 +173,10 @@ nuke: clean devnet-clean ## Completely clean the project directory
## Prepares for running a local devnet
pre-devnet: submodules $(DEVNET_CANNON_PRESTATE_FILES)
@if ! [ -x "$(command -v geth)" ]; then \
@if ! [ -x "$$(command -v geth)" ]; then \
make install-geth; \
fi
@if ! [ -x "$(command -v eth2-testnet-genesis)" ]; then \
@if ! [ -x "$$(command -v eth2-testnet-genesis)" ]; then \
make install-eth2-testnet-genesis; \
fi
.PHONY: pre-devnet
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment