Skip to content

Commit

Permalink
fix: remove quotes and newlines from outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
MSevey committed Oct 4, 2024
1 parent 094190c commit 70376ad
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions main.star
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,18 @@ def run(
),
)

# General notes on the following steps:
# - jq -r requests the raw output from jq, without quotes
# - tr -d '\n' removes the newline character from the output

# Get the node's address
get_address_result = plan.exec(
service_name=da_node_service_name,
recipe=ExecRecipe(
command=[
"sh",
"-c",
"celestia state account-address | jq .result",
"celestia state account-address | jq -r .result | tr -d '\n'",
],
),
acceptable_codes=[0],
Expand All @@ -80,7 +84,7 @@ def run(
command=[
"sh",
"-c",
"celestia {0} auth write --p2p.network {1}".format(
"celestia {0} auth write --p2p.network {1} | tr -d '\n'".format(
node_type, p2p_network
),
],
Expand All @@ -97,7 +101,7 @@ def run(
command=[
"sh",
"-c",
"celestia header network-head | jq .result.header.height",
"celestia header network-head | jq -r .result.header.height | tr -d '\n'",
],
),
acceptable_codes=[0],
Expand Down

0 comments on commit 70376ad

Please sign in to comment.