From 4fd9b553be31262051974fce908a3477ab23fe4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20R=C4=85czy?= Date: Fri, 15 Sep 2023 19:05:32 -0700 Subject: [PATCH] macOS: add prompt about support in setup script (#29939) * Add prompt about the state of macos support in mac_setup * Change words Co-authored-by: Adeeb Shihadeh --------- Co-authored-by: Adeeb Shihadeh old-commit-hash: f0b8ecd14f7aed3d3ad46c770881e3028ed9781f --- .github/workflows/selfdrive_tests.yaml | 2 +- tools/mac_setup.sh | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/selfdrive_tests.yaml b/.github/workflows/selfdrive_tests.yaml index 575ee21835..6fd2ca8556 100644 --- a/.github/workflows/selfdrive_tests.yaml +++ b/.github/workflows/selfdrive_tests.yaml @@ -142,7 +142,7 @@ jobs: fi - name: Install dependencies if: steps.dependency-cache.outputs.cache-hit != 'true' - run: ./tools/mac_setup.sh + run: SKIP_PROMPT=1 ./tools/mac_setup.sh env: # package install has DeprecationWarnings PYTHONWARNINGS: default diff --git a/tools/mac_setup.sh b/tools/mac_setup.sh index 0c9627ca4e..9ec2097ea4 100755 --- a/tools/mac_setup.sh +++ b/tools/mac_setup.sh @@ -2,6 +2,20 @@ set -e +if [ -z "$SKIP_PROMPT" ]; then + echo "--------------- macOS support ---------------" + echo "Running openpilot natively on macOS is not officially supported." + echo "It might build, some parts of it might work, but it's not fully tested, so there might be some issues." + echo + echo "Check out devcontainers for a seamless experience (see tools/README.md)." + echo "-------------------------------------------------" + echo -n "Are you sure you want to continue? [y/N] " + read -r response + if [[ ! "$response" =~ ^([yY][eE][sS]|[yY])+$ ]]; then + exit 1 + fi +fi + DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" ROOT="$(cd $DIR/../ && pwd)" ARCH=$(uname -m)