test-network: Make the regexp of checking version more strict

Signed-off-by: Justin Yang <justin.yang@themedium.io>
This commit is contained in:
Justin Yang 2021-10-26 18:51:43 +09:00
parent d81684fa0a
commit ecacb9fe43

View file

@ -53,8 +53,8 @@ function checkPrereqs() {
fi
# use the fabric tools container to see if the samples and binaries match your
# docker images
LOCAL_VERSION=$(peer version | sed -ne 's/ Version: //p')
DOCKER_IMAGE_VERSION=$(docker run --rm hyperledger/fabric-tools:latest peer version | sed -ne 's/ Version: //p' | head -1)
LOCAL_VERSION=$(peer version | sed -ne 's/^ Version: //p')
DOCKER_IMAGE_VERSION=$(docker run --rm hyperledger/fabric-tools:latest peer version | sed -ne 's/^ Version: //p')
infoln "LOCAL_VERSION=$LOCAL_VERSION"
infoln "DOCKER_IMAGE_VERSION=$DOCKER_IMAGE_VERSION"