From f4633c845ff2a0d1d5477cb1a555b8b6ed29d1c1 Mon Sep 17 00:00:00 2001 From: vivekpatani <9080894+vivekpatani@users.noreply.github.com> Date: Thu, 15 Feb 2024 19:55:18 -0800 Subject: [PATCH] *: fix failing shellchecks - shellcheck violations fixed - https://github.com/etcd-io/etcd/issues/17400 Signed-off-by: vivekpatani <9080894+vivekpatani@users.noreply.github.com> --- build.sh | 12 ++++++------ scripts/install-marker.sh | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build.sh b/build.sh index cebefb950bf..0f65f6dbae6 100755 --- a/build.sh +++ b/build.sh @@ -22,18 +22,18 @@ CGO_ENABLED="${CGO_ENABLED:-0}" GO_LDFLAGS=(${GO_LDFLAGS:-} "-X=${VERSION_SYMBOL}=${GIT_SHA}") GO_BUILD_ENV=("CGO_ENABLED=${CGO_ENABLED}" "GO_BUILD_FLAGS=${GO_BUILD_FLAGS:-}" "GOOS=${GOOS}" "GOARCH=${GOARCH}") -GOFAIL_VERSION=$(cd tools/mod && go list -m -f {{.Version}} go.etcd.io/gofail) +GOFAIL_VERSION=$(cd tools/mod && go list -m -f '{{.Version}}' go.etcd.io/gofail) # enable/disable failpoints toggle_failpoints() { mode="$1" if command -v gofail >/dev/null 2>&1; then run gofail "$mode" server/etcdserver/ server/mvcc/ server/wal/ server/mvcc/backend/ if [[ "$mode" == "enable" ]]; then - go get go.etcd.io/gofail@${GOFAIL_VERSION} - cd ./server && go get go.etcd.io/gofail@${GOFAIL_VERSION} - cd ../etcdutl && go get go.etcd.io/gofail@${GOFAIL_VERSION} - cd ../etcdctl && go get go.etcd.io/gofail@${GOFAIL_VERSION} - cd ../tests && go get go.etcd.io/gofail@${GOFAIL_VERSION} + go get go.etcd.io/gofail@"${GOFAIL_VERSION}" + cd ./server && go get go.etcd.io/gofail@"${GOFAIL_VERSION}" + cd ../etcdutl && go get go.etcd.io/gofail@"${GOFAIL_VERSION}" + cd ../etcdctl && go get go.etcd.io/gofail@"${GOFAIL_VERSION}" + cd ../tests && go get go.etcd.io/gofail@"${GOFAIL_VERSION}" cd ../ else go mod tidy diff --git a/scripts/install-marker.sh b/scripts/install-marker.sh index 467492666d1..495b0ec74b2 100755 --- a/scripts/install-marker.sh +++ b/scripts/install-marker.sh @@ -10,7 +10,7 @@ if [ -z "$1" ]; then fi MARKER_URL=https://storage.googleapis.com/etcd/test-binaries/marker-v0.4.0-x86_64-unknown-linux-gnu -if [ ${ARCH} == "darwin" ]; then +if [ "${ARCH}" == "darwin" ]; then MARKER_URL=https://storage.googleapis.com/etcd/test-binaries/marker-v0.4.0-x86_64-apple-darwin fi