Skip to content

Commit 252c97b

Browse files
committed
Exit with an error status when any proposal is invalid
1 parent 21f64df commit 252c97b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

zebra-utils/zcash-rpc-block-template-to-proposal

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,15 @@ $DIFF --from-file=$PROPOSAL_NODES_PROPOSAL_RESPONSE_LIST && \
202202

203203
echo
204204

205+
EXIT_STATUS=0
205206
for RESPONSE in $PROPOSAL_NODES_PROPOSAL_RESPONSE_LIST; do
206207
if [ -s "$RESPONSE" ]; then
207208
echo "Node said proposal was invalid, error response from $RESPONSE:"
208209
cat "$RESPONSE"
210+
EXIT_STATUS=1
209211
else
210212
echo "Node said proposal was valid, empty success response in $RESPONSE"
211213
fi
212214
done
215+
216+
exit $EXIT_STATUS

0 commit comments

Comments
 (0)