added a check for prereq into deploycc script

Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
This commit is contained in:
Parameswaran Selvam 2022-12-13 05:46:21 -08:00
parent 4109e741e4
commit 71f4723f5f

View file

@ -122,6 +122,21 @@ packageChaincode() {
successln "Chaincode is packaged" 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 ## package the chaincode
packageChaincode packageChaincode