Skip to content

ctrl+c of repl task exits the repl entirely #493

Description

@thegu5

I have confirmed that this is a bug related to nh

  • This is a bug, and not an user error or a support request. I understand that my issue will be closed if it is not a bug in NH.
  • I have checked the issues tab and confirmed that my issue has not yet been reported. I understand that my issue will be closed if it is a duplicate.

Description

When cancelling a long running task in a repl launched via nh os repl, the repl is exited entirely instead of just cancelling the task.

$ nh os repl                                                                                                                                                                                                1358ms
Nix 2.31.2
Type :? for help.
Loading installable 'git+file:///home/gu5/Documents/git/nix-config#nixosConfigurations.enth'...
Added 11 variables.
_module, _type, class, config, extendModules, extraArgs, graph, lib, options, pkgs, type
nix-repl> pkgs
{
  AAAAAASomeThingsFailToEvaluate = «error: This pseudo-package is likely not the only part of Nixpkgs that fails to evaluate.
You should not evaluate entire Nixpkgs without measures to handle failing packages.
»;
  AMB-plugins = «derivation /nix/store/2x7yz3gavrqlx7q2n5qvf6fjxar52d4j-AMB-plugins-0.8.1.drv»;
error: interrupted by the user

Failed tcsetattr(TCSADRAIN): Input/output error
nix-repl> Failed tcsetattr(TCSADRAIN): Input/output error
$ # back at the shell prompt

vs

nix repl
Nix 2.31.2
Type :? for help.
nix-repl> import <nixpkgs> { }
{
  AAAAAASomeThingsFailToEvaluate = «error: This pseudo-package is likely not the only part of Nixpkgs that fails to evaluate.
You should not evaluate entire Nixpkgs without measures to handle failing packages.
»;
  AMB-plugins = «derivation /nix/store/2x7yz3gavrqlx7q2n5qvf6fjxar52d4j-AMB-plugins-0.8.1.drv»;
error: interrupted by the user

nix-repl> # still in the repl

Installation Method

Stable Release (nixpkgs, pkgs.nh from nixos-unstable or nixos-yy-mm)

Installation Method (Other)

No response

NH Version

v4.2.0

System Information

  • system: "x86_64-linux"
  • host os: Linux 6.12.58, NixOS, 26.05 (Yarara), 26.05.20251127.2fad6ea
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.31.2
  • nixpkgs: /nix/store/fqyqwsw82v7jr6ncgrrg7cama5sl577r-source

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug (requires confirmation)User might have misclassified, or might be an AI hallucination. We literally don't know.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions