Skip to content

Commit 7499d84

Browse files
linuxdevelclaude
andcommitted
fix(bundle): fall back to building linuxdevel/sandbox-runtime if dist missing
If the main project's pnpm store doesn't have a pre-built sandbox-runtime dist (e.g. local dev without CI step), clone and build from the linuxdevel fork rather than hard-failing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 71394b3 commit 7499d84

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

scripts/bundle.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,14 @@ echo "==> Installing production dependencies in bundle..."
5656
echo "==> Patching sandbox-runtime dist into bundle..."
5757
MAIN_SRT=$(find node_modules/.pnpm -maxdepth 4 -path "*/@anthropic-ai/sandbox-runtime" -type d | head -1)
5858
BUNDLE_SRT=$(find bundle/safeclaw/node_modules/.pnpm -maxdepth 4 -path "*/@anthropic-ai/sandbox-runtime" -type d | head -1)
59-
if [ -n "$MAIN_SRT" ] && [ -d "$MAIN_SRT/dist" ] && [ -n "$BUNDLE_SRT" ]; then
59+
if [ -n "$MAIN_SRT" ] && [ -d "$MAIN_SRT/dist" ]; then
6060
cp -r "$MAIN_SRT/dist" "$BUNDLE_SRT/"
6161
else
62-
echo "ERROR: sandbox-runtime dist not found; run the CI build step first" >&2
63-
exit 1
62+
echo "==> sandbox-runtime dist not found locally; building from linuxdevel fork..."
63+
git clone --depth 1 https://github.com/linuxdevel/sandbox-runtime /tmp/sandbox-runtime-bundle
64+
npm --prefix /tmp/sandbox-runtime-bundle install
65+
npm --prefix /tmp/sandbox-runtime-bundle run build
66+
cp -r /tmp/sandbox-runtime-bundle/dist "$BUNDLE_SRT/"
6467
fi
6568

6669
echo "==> Creating tarball..."

0 commit comments

Comments
 (0)