nushell/crates/nu-protocol/src/pipeline
Ian Manske 03ee54a4df
Fix try not working with let, etc. (#13885)
# Description
Partialy addresses #13868. `try` does not catch non-zero exit code
errors from the last command in a pipeline if the result is assigned to
a variable using `let` (or `mut`).

This was fixed by adding a new `OutDest::Value` case. This is used when
the pipeline is in a "value" position. I.e., it will be collected into a
value. This ended up replacing most of the usages of `OutDest::Capture`.
So, this PR also renames `OutDest::Capture` to `OutDest::PipeSeparate`
to better fit the few remaining use cases for it.

# User-Facing Changes
Bug fix.

# Tests + Formatting
Added two tests.
2024-09-23 06:44:25 -05:00
..
byte_stream.rs Fix try not working with let, etc. (#13885) 2024-09-23 06:44:25 -05:00
handlers.rs fix: relay Signals reset to plugins (#13510) 2024-08-06 03:35:40 -07:00
list_stream.rs Document public types in nu-protocol (#12906) 2024-07-11 13:30:12 +02: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 not working with let, etc. (#13885) 2024-09-23 06:44:25 -05:00
pipeline_data.rs Fix try not working with let, etc. (#13885) 2024-09-23 06:44:25 -05:00
signals.rs fix: relay Signals reset to plugins (#13510) 2024-08-06 03:35:40 -07:00