nushell/crates/nu-protocol/src/pipeline
Solomon 942030199d
check signals while printing values (#14980)
Fixes #14960

# User-Facing Changes

- The output of non-streaming values can now be interrupted with ctrl-c:

```nushell
~> use std repeat; random chars --length 100kb | repeat 2000 | str join ' ' | collect
<data omitted>^C
Error:
  × Operation interrupted
   ╭─[entry #1:1:61]
 1 │ use std repeat; random chars --length 100kb | repeat 2000 | str join ' ' | collect
   ·                                                             ────┬───
   ·                                                                 ╰── This operation was interrupted
   ╰────
```

- When IO errors occur while printing data, nushell no longer panics:

```diff
 $ nu -c "true | print" | -

-Error:
-  x Main thread panicked.
-  |-> at crates/nu-protocol/src/errors/shell_error/io.rs:198:13
-  `-> for unknown spans with paths, use `new_internal_with_path`
+Error: nu:🐚:io::broken_pipe
+
+  x I/O error
+  `->   x Broken pipe
+
+   ,-[source:1:1]
+ 1 | true | print
+   : ^^|^
+   :   `-| Writing to stdout failed
+   :     | Broken pipe
+   `----
```
2025-02-07 06:56:07 -05:00
..
byte_stream.rs Enable nushell error with backtrace (#14945) 2025-02-06 22:05:58 +08:00
handlers.rs fix: relay Signals reset to plugins (#13510) 2024-08-06 03:35:40 -07:00
list_stream.rs Enable nushell error with backtrace (#14945) 2025-02-06 22:05:58 +08:00
metadata.rs Make pipeline metadata available to plugins (#13495) 2024-08-02 11:01:20 -07:00
mod.rs fix: relay Signals reset to plugins (#13510) 2024-08-06 03:35:40 -07:00
out_dest.rs Fix try printing when it is not the last pipeline element (#13992) 2024-10-12 14:37:10 +08:00
pipeline_data.rs check signals while printing values (#14980) 2025-02-07 06:56:07 -05:00
signals.rs fix: relay Signals reset to plugins (#13510) 2024-08-06 03:35:40 -07:00