WindSoilder f74694d5a3
Let redirection keep exit code (#7848)
# Description

Fixes: #7828

We delegate to `save` command to finish redirection, then if it runs to
success, the relative exit code is set to 0. To fix it, in redirection
context, we take exit_code stream before sending it to `save` command,
than manually returns `PipelineData::ExternalStream` to make nushell set
relative code properly.

# User-Facing Changes

_(List of all changes that impact the user experience here. This helps
us keep track of breaking changes.)_

# Tests + Formatting

Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A
clippy::needless_collect` to check that you're using the standard code
style
- `cargo test --workspace` to check that all tests pass

# After Submitting

If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
2023-01-30 16:49:31 +01:00
..
2022-11-22 16:58:11 -08:00
2023-01-04 23:50:18 +01:00
2023-01-22 19:49:40 +01:00
2022-12-30 17:44:37 +02:00
2022-02-07 14:54:06 -05:00
2022-11-21 17:04:36 +01:00
2022-02-17 06:40:24 -05:00
2022-02-07 14:54:06 -05:00
2022-12-22 00:33:26 +02:00
2022-09-11 11:48:27 +03:00
2022-02-16 12:24:45 -06:00
2022-05-18 20:47:26 -05:00
2022-07-04 06:31:50 +12:00
2022-02-07 14:54:06 -05:00
2022-11-11 19:51:08 +13:00
2022-12-13 11:56:44 -05:00
2022-12-22 16:38:07 -08:00
2023-01-04 23:50:18 +01:00
2022-09-11 11:48:27 +03:00
2022-02-07 14:54:06 -05:00
2022-11-09 17:06:47 -08:00
2022-02-07 14:54:06 -05:00
2022-02-07 14:54:06 -05:00
2022-11-27 07:19:02 +13:00
2023-01-16 12:43:46 +01:00
2022-12-02 11:36:01 +01:00
2022-12-08 07:31:57 +13:00
2022-12-08 07:31:57 +13:00
2022-03-24 16:42:41 +13:00