maintainers/scripts/check-hydra-by-maintainer: ctrl-c fully exit

Currently ctrl-c while shellHook is running will drop you inside the
nix-shell. This change catches ctrl-c and exits the same way.
This commit is contained in:
06kellyjac
2025-11-18 10:32:36 +00:00
parent c6589bb292
commit b1f26182a2
@@ -63,6 +63,12 @@ pkgs.stdenvNoCC.mkDerivation {
command = "hydra-check ${lib.escapeShellArgs packages}";
in
''
# if user presses ctrl-c during run
# pass on ctrl-c to fully quit rather than exiting to nix-shell
function ctrl_c() {
exit 130
}
trap ctrl_c INT
echo "Please stand by"
echo "${command}"
${command}