fix(nix): run nx build in background to handle SIGABRT

Background process signal handling allows wait to catch SIGABRT
and || true to suppress the non-zero exit status.
This commit is contained in:
maulanasdqn
2026-01-21 18:39:05 +07:00
parent ab0b56780f
commit 7d1370d7f2
+3 -4
View File
@@ -28,10 +28,9 @@ pkgs.buildNpmPackage {
export NX_NATIVE=false export NX_NATIVE=false
${pkgs.lib.concatStringsSep "\n" (pkgs.lib.mapAttrsToList (k: v: "export ${k}=\"${v}\"") envVars)} ${pkgs.lib.concatStringsSep "\n" (pkgs.lib.mapAttrsToList (k: v: "export ${k}=\"${v}\"") envVars)}
# Run nx build, ignore terminal crash after successful build # Run nx build, ignore terminal crash after successful build
# Disable errexit to handle SIGABRT from Nx terminal crash # Run in background and wait to handle SIGABRT from Nx terminal crash
set +e ./node_modules/.bin/nx build ${name} --output-style=static &
./node_modules/.bin/nx build ${name} --output-style=static wait $! || true
set -e
# Verify the build output exists # Verify the build output exists
test -d dist/apps/${name} test -d dist/apps/${name}
runHook postBuild runHook postBuild