Skip to content

Commit d286397

Browse files
Pothulapatiroboquat
authored andcommitted
[local-preview] Fail if M1 Mac
Currently, If its a M1 Mac, The local preview instance just continues running as the failures are in k3s. We should instead fail earlier so that the user understands the problem. We already have a warning for the same in the documentation website, but having a check seems to be useful. Signed-off-by: Tarun Pothulapati <tarun@gitpod.io>
1 parent 40ab42e commit d286397

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

install/preview/entrypoint.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,17 @@ if [ "$1" != "logging" ]; then
1818
exit
1919
fi
2020

21+
# fail if its arm64
22+
if [ "$(uname -m)" = 'arm64' ]; then
23+
echo "Gitpod local preview does not work on arm64 CPU's (including M1 Mac's)"
24+
exit 1
25+
fi
26+
2127
# check for minimum requirements
2228
REQUIRED_MEM_KB=$((6 * 1024 * 1024))
2329
total_mem_kb=$(awk '/MemTotal:/ {print $2}' /proc/meminfo)
2430
if [ "${total_mem_kb}" -lt "${REQUIRED_MEM_KB}" ]; then
25-
echo "Preview installation of Gitpod requires a system with at least 6GB of memory"
31+
echo "Gitpod local preview requires a system with at least 6GB of memory"
2632
exit 1
2733
else
2834
set -x
@@ -31,7 +37,7 @@ fi
3137
REQUIRED_CORES=4
3238
total_cores=$(nproc)
3339
if [ "${total_cores}" -lt "${REQUIRED_CORES}" ]; then
34-
echo "Preview installation of Gitpod requires a system with at least 4 CPU Cores"
40+
echo "Gitpod local preview requires a system with at least 4 CPU Cores"
3541
exit 1
3642
fi
3743

0 commit comments

Comments
 (0)