Commit b1f26182 authored by 06kellyjac's avatar 06kellyjac
Browse files

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.
parent c6589bb2
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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}