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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy