Skip to content

Commit

Permalink
Parse chainspec output correctly regardless of the ordering of sections
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafał Chabowski committed Aug 23, 2024
1 parent e8dc469 commit 74bc9a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sh/scenarios/client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1312,8 +1312,8 @@ function get_chainspec_from_rpc() {
OUTPUT=$($(get_path_to_client) get-chainspec \
--node-address "$(get_node_address_rpc)" \
-vv \
| sed -n '/\[protocol\]/,$p' \
| sed '/FAUCET/Q')
| awk '/\[.+\]/{flag=1} flag' \
| awk '/FAUCET/{exit} {print}')

# Check non-empty
check_client_responded "$OUTPUT"
Expand Down Expand Up @@ -1341,7 +1341,7 @@ function get_chainspec_json_from_rpc() {
OUTPUT=$($(get_path_to_client) get-chainspec \
--node-address "$(get_node_address_rpc)" \
-vv \
| sed '/\[protocol\]/Q')
| awk '/\[.+\]/{exit} {print}')

# Check non-empty
check_client_responded "$OUTPUT"
Expand Down

0 comments on commit 74bc9a6

Please sign in to comment.