fix(nix): use set +e to handle SIGABRT from Nx crash
Signal handling in bash requires set +e to prevent errexit from terminating the script when a process is killed by SIGABRT.
This commit is contained in:
+4
-1
@@ -28,7 +28,10 @@ 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
|
||||||
./node_modules/.bin/nx build ${name} --output-style=static || true
|
# Disable errexit to handle SIGABRT from Nx terminal crash
|
||||||
|
set +e
|
||||||
|
./node_modules/.bin/nx build ${name} --output-style=static
|
||||||
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user