Skip to content

Commit 6c394b8

Browse files
committed
fix: do not create directory on macOS
1 parent d0d6d92 commit 6c394b8

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

get-core.sh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,19 @@ DOCKER_RUN_ARGS=(
4545
-p "$EXTERNAL_PORT:3473"
4646
"$DOCKER_IMAGE"
4747
)
48+
IS_MACOS=0
49+
if [ "$(uname)" = "Darwin" ]; then
50+
IS_MACOS=1
51+
CORE_USER=root
52+
fi
4853

4954
ensure_docker_is_installed() {
5055
if docker info >/dev/null 2>&1; then
5156
echo "[🐳] Docker is present and works ✅"
5257
return 0
5358
fi
5459

55-
if [ "$(uname)" = "Darwin" ]; then
60+
if [ $IS_MACOS -eq 1 ]; then
5661
echo "[🐳] Docker needs to be installed: https://docs.docker.com/desktop/setup/install/mac-install/ ❌"
5762
else
5863
echo "[🐳] Docker needs to be installed: https://docs.docker.com/desktop/setup/install/linux/ ❌"
@@ -65,8 +70,7 @@ check_docker_version() {
6570
# See also:
6671
# * https://github.com/firebolt-db/firebolt-core/issues/9
6772
# * https://github.com/docker/for-mac/issues/7707
68-
if [ "$(uname)" = "Darwin" ]; then
69-
CORE_USER=root
73+
if [ $IS_MACOS -eq 1 ]; then
7074
version=$(docker version | sed -n 's/.*Docker Desktop \([0-9.]*\).*/\1/p')
7175
if [ "$version" = "4.42.1" ] || [ "$version" = "4.43.0" ] || [ "$version" = "4.43.1" ]; then
7276
echo "[❌] Firebolt Core cannot run with Docker Desktop version ${version} on Mac, as it contains a known io_uring issue; please use version 4.43.2+"
@@ -128,8 +132,10 @@ run_docker_image() {
128132

129133
case "$answer" in
130134
[yY])
131-
if [ ! -d firebolt-core-data ]; then
132-
mkdir -p --mode=777 firebolt-core-data
135+
if [ $IS_MACOS -eq 0 ]; then
136+
if [ ! -d firebolt-core-data ]; then
137+
mkdir -p --mode=777 firebolt-core-data
138+
fi
133139
fi
134140
echo -n "[🔥] Starting the Firebolt Core Docker container"
135141
CID="$(docker run --detach "${DOCKER_RUN_ARGS[@]}")"

0 commit comments

Comments
 (0)