diff --git a/package.json b/package.json index a525cd015d4..d5e13060981 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "format:check": "biome format .", "typecheck": "turbo typecheck", "ui-add": "turbo run ui-add", - "postinstall": "sherif; bun run --filter=@superset/desktop install:deps", + "postinstall": "./scripts/postinstall.sh", "clean": "git clean -xdf node_modules", "clean:workspaces": "turbo clean", "release:desktop": "./apps/desktop/create-release.sh", diff --git a/scripts/postinstall.sh b/scripts/postinstall.sh new file mode 100755 index 00000000000..de2a60239a2 --- /dev/null +++ b/scripts/postinstall.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Prevent infinite recursion during postinstall +# electron-builder install-app-deps can trigger nested bun installs +# which would re-run postinstall, spawning hundreds of processes + +if [ -n "$SUPERSET_POSTINSTALL_RUNNING" ]; then + exit 0 +fi + +export SUPERSET_POSTINSTALL_RUNNING=1 + +# Run sherif for workspace validation +sherif + +# Install native dependencies for desktop app +bun run --filter=@superset/desktop install:deps