Skip to content

Commit

Permalink
Simplify unset-or-null expansions after shfmt update to 3.6.0
Browse files Browse the repository at this point in the history
ref: mvdan/sh#849

Signed-off-by: Abirdcfly <[email protected]>
  • Loading branch information
Abirdcfly committed Dec 22, 2022
1 parent 7cf3526 commit a9a4bbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hack/lib/golang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -o pipefail
function go::build_binary() {
local -r targets=($@)

IFS="," read -ra platforms <<<"${BUILD_PLATFORMS:-}"
IFS="," read -ra platforms <<<"${BUILD_PLATFORMS-}"
if [[ ${#platforms[@]} -eq 0 ]]; then
read -ra platforms <<<$(go::host_platform)
fi
Expand All @@ -32,7 +32,7 @@ function go::build_binary_for_platform() {

set -x
GO111MODULE=on CGO_ENABLED=0 GOOS=${os} GOARCH=${arch} go build -v \
-ldflags "${LDFLAGS:-}" \
-ldflags "${LDFLAGS-}" \
-o "_output/bin/${platform}/$target" \
"cmd/$target/main.go"
set +x
Expand Down

0 comments on commit a9a4bbf

Please sign in to comment.