diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2021-10-07 23:58:02 +0200 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2021-10-07 23:58:02 +0200 |
commit | 0872659002d17dc7941b94075b3b9a54169d173f (patch) | |
tree | 09d8a124d7553c3af71164472e244e31c23c5ca4 /src/libstore/profiles.cc | |
parent | 844dd901a7debe8b03ec93a7f717b6c4038dc572 (diff) |
nix repl: properly deal with interruptions
When I stop a download with Ctrl-C in a `nix repl` of a flake, the REPL
refuses to do any other downloads:
nix-repl> builtins.getFlake "nix-serve"
[0.0 MiB DL] downloading 'https://api.github.com/repos/edolstra/nix-serve/tarball/e9828a9e01a14297d15ca41 error: download of 'https://api.github.com/repos/edolstra/nix-serve/tarball/e9828a9e01a14297d15ca416e5a9415d4972b0f0' was interrupted
[0.0 MiB DL]
nix-repl> builtins.getFlake "nix-serve"
error: interrupted by the user
[0.0 MiB DL]
To fix this issue, two changes were necessary:
* Reset the global `_isInterrupted` variable: only because a single
operation was aborted, it should still be possible to continue the
session.
* Recreate a `fileTransfer`-instance if the current one was shut down by
an abort.
Diffstat (limited to 'src/libstore/profiles.cc')
0 files changed, 0 insertions, 0 deletions