added a check for prereq into deploycc script (#884)

Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>

Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
This commit is contained in:
Parameswaran Selvam 2022-12-14 14:01:10 +05:30 committed by GitHub
parent a96efaebde
commit f838d6b5a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -122,6 +122,21 @@ packageChaincode() {
successln "Chaincode is packaged"
}
function checkPrereqs() {
jq --version > /dev/null 2>&1
if [[ $? -ne 0 ]]; then
errorln "jq command not found..."
errorln
errorln "Follow the instructions in the Fabric docs to install the prereqs"
errorln "https://hyperledger-fabric.readthedocs.io/en/latest/prereqs.html"
exit 1
fi
}
#check for prerequisites
checkPrereqs
## package the chaincode
packageChaincode