File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -21,17 +21,16 @@ source "$(dirname $0)/vet-common.sh"
2121PROTOC_VERSION=" 25.2"
2222
2323# Function to download pre-built binaries for Linux with
24- # ARCH as $1, OS as $2, and WORKDIR as $3 arguments.
24+ # ARCH as $1, OS as $2, and INSTALL_PATH as $3 arguments.
2525download_binary () {
26- # Check if protoc is already available
26+ # Check if protoc is already available.
2727 if command -v protoc & > /dev/null; then
28- if installed_version =$( protoc --version | cut -d' ' -f2 2> /dev/null) ; then
29- if [ " $installed_version " = " $PROTOC_VERSION " ]; then
28+ if INSTALL_VERSION =$( protoc --version | cut -d' ' -f2 2> /dev/null) ; then
29+ if [ " $INSTALL_VERSION " = " $PROTOC_VERSION " ]; then
3030 echo " protoc version $PROTOC_VERSION is already installed."
3131 return
3232 else
33- echo " Existing protoc version ($installed_version ) differs. Kindly make sure you have $PROTOC_VERSION installed."
34- exit 1
33+ die " Existing protoc version ($INSTALL_VERSION ) differs. Kindly make sure you have $PROTOC_VERSION installed."
3534 fi
3635 else
3736 echo " Unable to determine installed protoc version. Starting the installation."
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ if [[ "$1" = "-install" ]]; then
2323 if [[ " ${GITHUB_ACTIONS} " = " true" ]]; then
2424 source ./scripts/install_protoc.sh " /home/runner/go"
2525 else
26- die " run protoc installer https://github.com/grpc/grpc-go/scripts/install_protoc.sh. "
26+ die " run protoc installer https://github.com/grpc/grpc-go/scripts/install_protoc.sh"
2727 fi
2828 echo SUCCESS
2929 exit 0
You can’t perform that action at this time.
0 commit comments