Skip to content

Weird error when user-interrupted while unpacking #14757

@roberth

Description

@roberth

Describe the bug

$ nix flake check
warning: unknown flake output 'modules'
error:
       … while checking flake output 'checks'

       … while checking the derivation 'checks.x86_64-linux.nix-bindings-bindgen-raw-tests'

       … while evaluating the attribute 'optionalValue.value'
         at «github:nix-community/nixpkgs.lib/719359f4562934ae99f5443f20aa06c2ffff91fc?narHash=sha256-b0yj6kfvO8ApcSE%2BQmA6mUfu8IYG6/uU28OFn4PaC8M%3D»/lib/modules.nix:1253:5:
         1252|
         1253|     optionalValue = if isDefined then { value = mergedValue; } else { };
             |     ^
         1254|   };

       … while evaluating definitions from `/nix/store/r3i0h1671yjfr8xzldmvbyffyrmx2y0m-source/extras/partitions.nix':

       … while evaluating definitions from `/nix/store/r3i0h1671yjfr8xzldmvbyffyrmx2y0m-source/modules/transposition.nix':

       … while evaluating the option `perSystem.x86_64-linux.nci.outputs.nix-bindings-bindgen-raw.check':

       … while evaluating definitions from `/nix/store/miczn3a7klwhnxinx1ir39zkpwz7m6jv-source/src/implementation.nix, via option partitions.dev.module.perSystem':

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: Failed to open archive (Source threw exception: error: interrupted by the user)

Steps To Reproduce

$ nix --version
nix (Nix) 2.33.0pre20251111_091c0a9
  1. evaluate in a fetching fashion
  2. Ctrl+C

Expected behavior

$ nix flake check
error: interrupted by the user

Metadata

Additional context

Not a priority, but probably an easy fix.

Possible solution: catch user interrupt separately and rethrow without wrapping or anything.


Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugerror-messagesConfusing messages and better diagnosticsfetchingNetworking with the outside (non-Nix) world, input locking

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions