Skip to content

Commit

Permalink
Add safeguard for missing jq in the system (#24)
Browse files Browse the repository at this point in the history
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 ; }
```
  • Loading branch information
uzzer authored Mar 14, 2023
1 parent e5d6ae6 commit a16a301
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ services:
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:

```
command -v jq &> /dev/null || { echo "jq is not installed" 1>&2 ; }
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 |
Expand Down

0 comments on commit a16a301

Please sign in to comment.