3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #161079 from SuperSandro2000/exit-handler

This commit is contained in:
Sandro 2022-03-01 14:41:56 +01:00 committed by GitHub
commit 800e9e9994
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -9,7 +9,7 @@ tmp=$(mktemp --tmpdir -d nixpkgs-dep-license.XXXXXX)
exitHandler() {
exitCode=$?
rm -rf "$tmp"
exit $exitCode
return $exitCode
}
trap "exitHandler" EXIT

View file

@ -143,14 +143,14 @@ exitHandler() {
echo "build failed with exit code $exitCode (ignored)"
mkdir -p "$out/nix-support"
printf "%s" "$exitCode" > "$out/nix-support/failed"
exit 0
return 0
fi
else
runHook exitHook
fi
exit "$exitCode"
return "$exitCode"
}
trap "exitHandler" EXIT