Skip to content

Commit

Permalink
Use docker image for jq if command isn't available
Browse files Browse the repository at this point in the history
  • Loading branch information
sbellem committed Jan 20, 2024
1 parent 219906b commit b0bd6bc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion hacking/scripts/start_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ docker compose stop localsecret-1

docker compose logs localsecret-2 --tail 5

echo
echo "*************************************************************************"
echo "* *"
echo "* Secret Network Test Nodes are now setup, and ready for experiments. *"
Expand All @@ -57,4 +58,11 @@ echo "*************************************************************************"

printf "\nNode 2 status info:\n"

docker compose exec localsecret-2 secretd status | jq .ValidatorInfo
if command -v jq &> /dev/null
then
jq_cmd="jq"
else
jq_cmd="docker run -i --rm ghcr.io/jqlang/jq"
fi

docker compose exec localsecret-2 secretd status | ${jq_cmd} .ValidatorInfo

0 comments on commit b0bd6bc

Please sign in to comment.