Skip to content

Commit e4d7760

Browse files
committed
[ FAB-8730 ] hyphen breaks fabric-samples
The jq script which performs the config update in scripts/run-fabric.sh fails if the orderer name contains a hyphen. It requires modifying the way in which jq interpolates shell variables. Change-Id: Ie4de9459cb17693465613d6efd78b3d98575bbb2 Signed-off-by: rennman <eabailey@us.ibm.com>
1 parent 2bbb0a8 commit e4d7760

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fabric-ca/scripts/run-fabric.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ function createConfigUpdatePayloadWithCRL {
238238
jq .data.data[0].payload.data.config config_block.json > config.json
239239

240240
# Update crl in the config json
241-
crl=$(cat $CORE_PEER_MSPCONFIGPATH/crls/crl*.pem | base64 | tr -d '\n')
242-
cat config.json | jq '.channel_group.groups.Application.groups.'"${ORG}"'.values.MSP.value.config.revocation_list = ["'"${crl}"'"]' > updated_config.json
241+
CRL=$(cat $CORE_PEER_MSPCONFIGPATH/crls/crl*.pem | base64 | tr -d '\n')
242+
cat config.json | jq --arg org "$ORG" --arg crl "$CRL" '.channel_group.groups.Application.groups[$org].values.MSP.value.config.revocation_list = [$crl]' > updated_config.json
243243

244244
# Create the config diff protobuf
245245
curl -X POST --data-binary @config.json $CTLURL/protolator/encode/common.Config > config.pb
@@ -266,6 +266,7 @@ function finish {
266266
else
267267
logr "Tests did not complete successfully; see $RUN_LOGFILE for more details"
268268
touch /$RUN_FAIL_FILE
269+
exit 1
269270
fi
270271
}
271272

0 commit comments

Comments
 (0)