Skip to content

Commit 64f0473

Browse files
authored
chore: Prefer [[ over [ in bash build scripts (#2543)
1 parent fe81b0b commit 64f0473

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

scripts/lib.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ if [[ "${CODER_LIBSH_NO_CHECK_DEPENDENCIES:-}" != *t* ]]; then
156156
# we capture the version output first before
157157
make_version_raw="$(make --version 2>/dev/null)"
158158
make_version="$(echo "$make_version_raw" | head -n1 | grep -oE '([[:digit:]]+\.){1,2}[[:digit:]]+')"
159-
if [ "${make_version//.*/}" -lt 4 ]; then
159+
if [[ ${make_version//.*/} -lt 4 ]]; then
160160
libsh_bad_dependencies=1
161161
log "ERROR: You need at least make 4.0 to run the scripts in the Coder repo."
162162
if isdarwin; then

scripts/sign_darwin.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ rc=0
4848
for i in $(seq 1 2); do
4949
gon "$config" && rc=0 && break || rc=$?
5050
log "gon exit code: $rc"
51-
if [ "$i" -lt 5 ]; then
51+
if [[ $i -lt 5 ]]; then
5252
log
5353
log "Retrying notarization in 60 seconds"
5454
log

scripts/yarn_install.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ PROJECT_ROOT=$(cd "$SCRIPT_DIR" && git rev-parse --show-toplevel)
2323
# --check-files
2424
)
2525

26-
if [ -n "${CI:-}" ]; then
26+
if [[ -n ${CI:-} ]]; then
2727
yarn_flags+=(
2828
# Install dependencies from lockfile, ensuring builds are fully
2929
# reproducible

0 commit comments

Comments
 (0)