Skip to content

Commit a16a301

Browse files
authored
Add safeguard for missing jq in the system (#24)
Warn developer for missing package, as original error message does not say this straight. Another more "polluted" options is ``` command -v jq &> /dev/null && echo Latest synced block behind by: \ $((($( date +%s )-\ $( curl -s -d '{"id":0,"jsonrpc":"2.0","method":"optimism_syncStatus"}' -H "Content-Type: application/json" http://localhost:7545 | jq -r .result.unsafe_l2.timestamp))/60)) minutes || { echo "mvn is not installed" 1>&2 ; } ```
1 parent e5d6ae6 commit a16a301

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ services:
8080
Sync speed depends on your L1 node, as the majority of the chain is derived from data submitted to the L1. You can check your syncing status using the `optimism_syncStatus` RPC on the `op-node` container. Example:
8181

8282
```
83+
command -v jq &> /dev/null || { echo "jq is not installed" 1>&2 ; }
8384
echo Latest synced block behind by: \
8485
$((($( date +%s )-\
8586
$( curl -s -d '{"id":0,"jsonrpc":"2.0","method":"optimism_syncStatus"}' -H "Content-Type: application/json" http://localhost:7545 |

0 commit comments

Comments
 (0)