byfn.sh: CURRENT_DIR issue with long paths fixed

Double quoted CURRENT_DIR var to allow right expansion for long paths. Before it cause a "too many arguments" for cd command
This commit is contained in:
Gianluca Boiano 2017-08-17 18:43:35 +02:00 committed by GitHub
parent ca8fad3151
commit f0fe35c514

View file

@ -152,11 +152,11 @@ function replacePrivateKey () {
CURRENT_DIR=$PWD
cd crypto-config/peerOrganizations/org1.example.com/ca/
PRIV_KEY=$(ls *_sk)
cd $CURRENT_DIR
cd "$CURRENT_DIR"
sed $OPTS "s/CA1_PRIVATE_KEY/${PRIV_KEY}/g" docker-compose-e2e.yaml
cd crypto-config/peerOrganizations/org2.example.com/ca/
PRIV_KEY=$(ls *_sk)
cd $CURRENT_DIR
cd "$CURRENT_DIR"
sed $OPTS "s/CA2_PRIVATE_KEY/${PRIV_KEY}/g" docker-compose-e2e.yaml
# If MacOSX, remove the temporary backup of the docker-compose file
if [ "$ARCH" == "Darwin" ]; then