nushell/crates/nu-engine/src
WindSoilder 80881c75f9
When using redirection, if a command generates non-zero exit code, the script should stop running (#11191)
# Description
Fixes: #11153

To make sure scripts stop from running on non-zero exit code, we need to
invoke `might_consume_external_result` on
`PipelineData::ExternalStream`, so it can tell nushell if this command
exists with non-zero exit code.

And this pr also adjusts some test cases.

# User-Facing Changes
```nushell
^false out> /dev/null; print "ok"
```

After this pr, it shouldn't print ok.

# Tests + Formatting
Done
2023-11-30 18:52:02 +01:00
..
call_ext.rs Make FromValue take owned Values (#10900) 2023-10-31 19:47:00 +01:00
column.rs Use Record's public API in a bunch of places (#10927) 2023-11-08 14:24:00 +01:00
documentation.rs Spread operator in record literals (#11144) 2023-11-29 18:31:31 +01:00
env.rs Refactor env conversion, yeet Value::follow_cell_path_not... (#10926) 2023-11-08 23:57:24 +01:00
eval.rs When using redirection, if a command generates non-zero exit code, the script should stop running (#11191) 2023-11-30 18:52:02 +01:00
glob_from.rs Convert more ShellError variants to named fields (#11173) 2023-11-28 06:43:51 -06:00
lib.rs Allow operator in constants (#10212) 2023-09-05 16:35:58 +02:00
scope.rs Use Record APIs in nu-protocol/nu-engine (#10917) 2023-11-01 23:19:58 +01:00