From 875e346225e5718c926ae026ffea59308ddbd853 Mon Sep 17 00:00:00 2001 From: Anaswara T Rajan Date: Thu, 27 Feb 2025 17:09:39 +0530 Subject: [PATCH] check for golang installation and exit if no installation found --- setup-project.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setup-project.sh b/setup-project.sh index 5161762e..a6a9e2ad 100755 --- a/setup-project.sh +++ b/setup-project.sh @@ -10,6 +10,14 @@ if [ "$OS" == "Linux" ]; then exit 1 fi + # Check golang installation and exit if no installation found. + if ! command -v go 2>&1 >/dev/null + then + echo "Could not detect Go installation. Please make sure you install Go first. + See https://go.dev/doc/install" + exit 1 + fi + # setup environment cd cli poetry install