Skip to content

Commit

Permalink
Skip using sudo if command does not exist (#829)
Browse files Browse the repository at this point in the history
Co-authored-by: Yevhen Ivantsov <[email protected]>
  • Loading branch information
bianchi2 and Yevhen Ivantsov authored Jul 10, 2024
1 parent 5ce51da commit f0858c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/test/scripts/kind/create_kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ if [ -z "${SKIP_DOWNLOAD_KIND}" ]; then
echo "[INFO]: Downloading KinD ${KIND_VERSION}"
curl -Lo ./kind "https://kind.sigs.k8s.io/dl/${KIND_VERSION}/kind-$(uname)-amd64"
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
SUDO=$(which sudo)
${SUDO} mv ./kind /usr/local/bin/kind
fi

echo "[INFO]: Using config file src/test/config/kind/kind-config.yml"
Expand Down

0 comments on commit f0858c5

Please sign in to comment.