You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(install): Update exit status and fix premature exit (#375)
Update exit -1 to exit 1 in line with best practices
Fixes premature exit of the script when checking for sse42 support. The
script would exit before displaying the reason for failure to the user.
Copy file name to clipboardExpand all lines: install.sh
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -49,24 +49,24 @@ function ensure_file_from_example {
49
49
50
50
if [ $(ver $DOCKER_VERSION)-lt$(ver $MIN_DOCKER_VERSION) ];then
51
51
echo"FAIL: Expected minimum Docker version to be $MIN_DOCKER_VERSION but found $DOCKER_VERSION"
52
-
exit-1
52
+
exit 1
53
53
fi
54
54
55
55
if [ $(ver $COMPOSE_VERSION)-lt$(ver $MIN_COMPOSE_VERSION) ];then
56
56
echo"FAIL: Expected minimum docker-compose version to be $MIN_COMPOSE_VERSION but found $COMPOSE_VERSION"
57
-
exit-1
57
+
exit 1
58
58
fi
59
59
60
60
if [ "$RAM_AVAILABLE_IN_DOCKER"-lt"$MIN_RAM" ];then
61
61
echo"FAIL: Expected minimum RAM available to Docker to be $MIN_RAM MB but found $RAM_AVAILABLE_IN_DOCKER MB"
62
-
exit-1
62
+
exit 1
63
63
fi
64
64
65
65
#SSE4.2 required by Clickhouse (https://clickhouse.yandex/docs/en/operations/requirements/)
66
-
SUPPORTS_SSE42=$(docker run --rm busybox grep -c sse4_2 /proc/cpuinfo);
66
+
SUPPORTS_SSE42=$(docker run --rm busybox grep -c sse4_2 /proc/cpuinfo|| :);
67
67
if(($SUPPORTS_SSE42==0));then
68
68
echo"FAIL: The CPU your machine is running on does not support the SSE 4.2 instruction set, which is required for one of the services Sentry uses (Clickhouse). See https://git.io/JvLDt for more info."
69
-
exit-1
69
+
exit 1
70
70
fi
71
71
72
72
# Clean up old stuff and ensure nothing is working while we install/update
0 commit comments