Skip to content

Commit e327448

Browse files
author
Nao Nishijima
committed
[FAB-4906] sed error in generateArtifacts.sh
generateArtifacts.sh does not work at 2nd time. Due to generating a private key every time, if we execute generateArtifacts.sh more than once, the command to get the private key will return more than one result. However, we do not expect this result. This patch set adds checking code of the existence of crypto-config dir at the beginning. Change-Id: Ie9249556c1988e30463683f688e4e50dc75d7b15 Signed-off-by: Nao Nishijima <[email protected]>
1 parent dc7c40b commit e327448

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

examples/e2e_cli/network_setup.sh

+7-3
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,13 @@ function removeUnwantedImages() {
5252
}
5353

5454
function networkUp () {
55-
#Generate all the artifacts that includes org certs, orderer genesis block,
56-
# channel configuration transaction
57-
source generateArtifacts.sh $CH_NAME
55+
if [ -f "./crypto-config" ]; then
56+
echo "crypto-config directory already exists."
57+
else
58+
#Generate all the artifacts that includes org certs, orderer genesis block,
59+
# channel configuration transaction
60+
source generateArtifacts.sh $CH_NAME
61+
fi
5862

5963
if [ "${IF_COUCHDB}" == "couchdb" ]; then
6064
CHANNEL_NAME=$CH_NAME TIMEOUT=$CLI_TIMEOUT docker-compose -f $COMPOSE_FILE -f $COMPOSE_FILE_COUCH up -d 2>&1

0 commit comments

Comments
 (0)