Skip to content

Commit 6f7efac

Browse files
committed
final fix
1 parent 77ac334 commit 6f7efac

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

scripts/install_protoc.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,16 @@ source "$(dirname $0)/vet-common.sh"
2121
PROTOC_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.
2525
download_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."

scripts/vet-proto.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)