From b1f26182a20dd8432165723b19bf1ff73c84430f Mon Sep 17 00:00:00 2001 From: 06kellyjac Date: Thu, 16 Oct 2025 11:37:26 +0100 Subject: [PATCH] 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. --- maintainers/scripts/check-hydra-by-maintainer.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/scripts/check-hydra-by-maintainer.nix b/maintainers/scripts/check-hydra-by-maintainer.nix index 26ef647ed4c9..6d3376a8347f 100644 --- a/maintainers/scripts/check-hydra-by-maintainer.nix +++ b/maintainers/scripts/check-hydra-by-maintainer.nix @@ -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}