replace error with warning if sandbox build is triggered without enabling, improve README to reduce confusion (#570)

This commit is contained in:
Olcan
2025-05-27 10:55:07 -07:00
committed by GitHub
parent 3511e84dc3
commit 9595e98db8
2 changed files with 19 additions and 6 deletions

View File

@@ -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)