From 422edb8c14832dddf9975e12ffa1e8e5fb91c379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Chabowski?= Date: Thu, 22 Aug 2024 17:53:56 +0200 Subject: [PATCH] Parse chainspec output correctly regardless of the ordering of sections --- sh/scenarios/client.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/scenarios/client.sh b/sh/scenarios/client.sh index 848c118..ffd2db5 100755 --- a/sh/scenarios/client.sh +++ b/sh/scenarios/client.sh @@ -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"