nushell/crates/nu-protocol/src
Devyn Cairns 948b90299d
Preserve attributes on external ByteStreams (#13305)
# Description

Bug fix: `PipelineData::check_external_failed()` was not preserving the
original `type_` and `known_size` attributes of the stream passed in for
streams that come from children, so `external-command | into binary` did
not work properly and always ended up still being unknown type.

# User-Facing Changes
The following test case now works as expected:

```nushell
> head -c 2 /dev/urandom | into binary
# Expected: pretty hex dump of binary
# Previous behavior: just raw binary in the terminal
```

# Tests + Formatting
Added a test to cover this to `into binary`
2024-07-05 21:10:41 +00:00
..
ast Revert "Span ID Refactor (Step 2): Make Call SpanId-friendly (#13268)" (#13292) 2024-07-04 00:02:13 +03:00
config remove the deprecated register command (#13297) 2024-07-05 07:16:50 -05:00
debugger Move most of the peculiar argument handling for external calls into the parser (#13089) 2024-06-19 21:00:03 -07:00
engine remove the deprecated register command (#13297) 2024-07-05 07:16:50 -05:00
errors Restrict strings beginning with quote should also ending with quote (#13131) 2024-06-28 09:47:12 +08:00
pipeline Preserve attributes on external ByteStreams (#13305) 2024-07-05 21:10:41 +00:00
plugin remove the deprecated register command (#13297) 2024-07-05 07:16:50 -05:00
process fix: coredump without any messages (#13034) 2024-06-07 08:02:52 -05:00
value Allow missing fields in derived FromValue::from_value calls (#13206) 2024-06-22 13:31:09 -07:00
alias.rs Use CommandType in more places (#12832) 2024-05-18 23:37:31 +00:00
did_you_mean.rs Improve case insensitivity consistency (#10884) 2023-11-08 23:58:54 +01:00
eval_base.rs Move most of the peculiar argument handling for external calls into the parser (#13089) 2024-06-19 21:00:03 -07:00
eval_const.rs Revert "Span ID Refactor (Step 2): Make Call SpanId-friendly (#13268)" (#13292) 2024-07-04 00:02:13 +03: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 Span ID Refactor - Step 1 (#12960) 2024-06-05 09:57:14 +08:00
lev_distance.rs Rework for new clippy lints (#12736) 2024-05-02 19:29:03 +02:00
lib.rs Enable reloading changes to a submodule (#13170) 2024-06-25 18:33:37 -07: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 Use CommandType in more places (#12832) 2024-05-18 23:37:31 +00:00
span.rs Span ID Refactor (Step 2): Use SpanId of expressions in some places (#13102) 2024-06-09 12:15:53 +03:00
syntax_shape.rs open, rm, umv, cp, rm and du: Don't globs if inputs are variables or string interpolation (#11886) 2024-02-23 09:17:09 +08:00
ty.rs Shrink the size of Expr (#12610) 2024-04-24 15:46:35 +00:00