mirror of
https://github.com/nushell/nushell.git
synced 2025-02-23 05:51:28 +01:00
ensure exit codes in more cases (#4804)
This commit is contained in:
parent
9abb14b5fd
commit
2b3843c7c0
@ -93,9 +93,20 @@ impl PipelineData {
|
||||
vals: s.collect(),
|
||||
span, // FIXME?
|
||||
},
|
||||
PipelineData::ExternalStream { stdout: None, .. } => Value::Nothing { span },
|
||||
PipelineData::ExternalStream {
|
||||
stdout: None,
|
||||
exit_code,
|
||||
..
|
||||
} => {
|
||||
// Make sure everything has finished
|
||||
if let Some(exit_code) = exit_code {
|
||||
let _: Vec<_> = exit_code.into_iter().collect();
|
||||
}
|
||||
Value::Nothing { span }
|
||||
}
|
||||
PipelineData::ExternalStream {
|
||||
stdout: Some(mut s),
|
||||
exit_code,
|
||||
..
|
||||
} => {
|
||||
let mut items = vec![];
|
||||
@ -111,6 +122,11 @@ impl PipelineData {
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure everything has finished
|
||||
if let Some(exit_code) = exit_code {
|
||||
let _: Vec<_> = exit_code.into_iter().collect();
|
||||
}
|
||||
|
||||
if s.is_binary {
|
||||
let mut output = vec![];
|
||||
for item in items {
|
||||
|
Loading…
Reference in New Issue
Block a user