From 9595e98db81806ba5bbd6cadcc49ae6911a72406 Mon Sep 17 00:00:00 2001 From: Olcan Date: Tue, 27 May 2025 10:55:07 -0700 Subject: replace error with warning if sandbox build is triggered without enabling, improve README to reduce confusion (#570) --- scripts/build_sandbox.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/build_sandbox.sh b/scripts/build_sandbox.sh index 2988ddab..58ad6d03 100755 --- a/scripts/build_sandbox.sh +++ b/scripts/build_sandbox.sh @@ -15,9 +15,12 @@ set -euo pipefail -if ! scripts/sandbox_command.sh -q; then - echo "ERROR: sandboxing disabled. See README.md to enable sandboxing." - exit 1 +# exit with warning if container-based sandboxing is disabled +# note this includes the case where sandbox-exec (seatbelt) is used +# this happens most commonly when user runs `npm run build:all` without enabling sandboxing +if ! scripts/sandbox_command.sh -q || [ "$(scripts/sandbox_command.sh)" == "sandbox-exec" ]; then + echo "WARNING: container-based sandboxing is disabled (see README.md#sandboxing)" + exit 0 fi CMD=$(scripts/sandbox_command.sh) -- cgit v1.2.3