Skip to content

Commit d587721

Browse files
committed
Fix unbound variable error in install script
1 parent d885dd3 commit d587721

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

install/_lib.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ function ensure_file_from_example {
5656
# Check the version of $1 is greater than or equal to $2 using sort. Note: versions must be stripped of "v"
5757
function vergte() {
5858
printf "%s\n%s" $1 $2 | sort --version-sort --check=quiet --reverse
59-
echo $?
6059
}
6160

6261
SENTRY_CONFIG_PY=sentry/sentry.conf.py

install/check-minimum-requirements.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ if [[ -z "$DOCKER_VERSION" ]]; then
88
exit 1
99
fi
1010

11-
if [[ "$(vergte ${DOCKER_VERSION//v/} $MIN_DOCKER_VERSION)" -eq 1 ]]; then
11+
if ! vergte ${DOCKER_VERSION//v/} $MIN_DOCKER_VERSION; then
1212
echo "FAIL: Expected minimum docker version to be $MIN_DOCKER_VERSION but found $DOCKER_VERSION"
1313
exit 1
1414
fi
1515
echo "Found Docker version $DOCKER_VERSION"
1616

17-
if [[ "$(vergte ${COMPOSE_VERSION//v/} $MIN_COMPOSE_VERSION)" -eq 1 ]]; then
17+
if ! vergte ${COMPOSE_VERSION//v/} $MIN_COMPOSE_VERSION; then
1818
echo "FAIL: Expected minimum $dc_base version to be $MIN_COMPOSE_VERSION but found $COMPOSE_VERSION"
1919
exit 1
2020
fi

install/dc-detect-version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ if [[ -z "$COMPOSE_VERSION" && -z "$STANDALONE_COMPOSE_VERSION" ]]; then
2121
fi
2222

2323
if [[ ! -z "${STANDALONE_COMPOSE_VERSION}" ]]; then
24-
if [[ "$(vergte ${COMPOSE_VERSION//v/} ${STANDALONE_COMPOSE_VERSION//v/})" -eq 1 ]]; then
24+
if ! vergte ${COMPOSE_VERSION//v/} ${STANDALONE_COMPOSE_VERSION//v/}; then
2525
COMPOSE_VERSION="${STANDALONE_COMPOSE_VERSION}"
2626
dc_base="$dc_base_standalone"
2727
fi

0 commit comments

Comments
 (0)