nushell/crates/nu-protocol/src
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
..
ast Fix $in in range expressions (#13447) 2024-07-25 18:28:44 +08:00
config Error on non-zero exit statuses (#13515) 2024-09-07 06:44:26 +00:00
debugger Overhaul $in expressions (#13357) 2024-07-17 16:02:42 -05:00
engine Fix try not working with let, etc. (#13885) 2024-09-23 06:44:25 -05:00
errors Refining error handling in http post (#13805) 2024-09-07 23:57:34 +02:00
ir Fix try not working with let, etc. (#13885) 2024-09-23 06:44:25 -05:00
pipeline Fix try not working with let, etc. (#13885) 2024-09-23 06:44:25 -05:00
plugin Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
process Fix do -p not waiting for external commands (#13881) 2024-09-22 22:26:32 +08:00
value Use IntoValue in config code (#13751) 2024-09-05 09:44:23 +02:00
alias.rs Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
did_you_mean.rs Improve case insensitivity consistency (#10884) 2023-11-08 23:58:54 +01:00
eval_base.rs Overhaul $in expressions (#13357) 2024-07-17 16:02:42 -05:00
eval_const.rs Use IntoValue in config code (#13751) 2024-09-05 09:44:23 +02:00
example.rs Overhaul the plugin cache file with a new msgpack+brotli format (#12579) 2024-04-21 07:36:26 -05:00
id.rs Internal representation (IR) compiler and evaluator (#13330) 2024-07-10 17:33:59 -07:00
lev_distance.rs Rework for new clippy lints (#12736) 2024-05-02 19:29:03 +02:00
lib.rs Add top-level crate documentation/READMEs (#12907) 2024-07-14 10:10:41 +02:00
module.rs Enable reloading changes to a submodule (#13170) 2024-06-25 18:33:37 -07:00
parser_path.rs Enable reloading changes to a submodule (#13170) 2024-06-25 18:33:37 -07:00
signature.rs Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
span.rs fix --ide-ast when there are errors (#13737) 2024-09-06 07:17:40 +08:00
syntax_shape.rs Make parsing for unknown args in known externals like normal external calls (#13414) 2024-07-21 01:32:36 -07:00
ty.rs Deprecate group in favor of chunks (#13377) 2024-07-16 03:49:00 +00:00