forked from extern/nushell
parent
29fd8b55fb
commit
65980c7beb
@ -296,12 +296,11 @@ async fn run_with_stdin(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let errored = match popen.wait() {
|
loop {
|
||||||
Ok(status) => !status.success(),
|
match popen.poll() {
|
||||||
Err(e) => true,
|
None => std::thread::sleep(std::time::Duration::new(0, 100_000_000)),
|
||||||
};
|
Some(status) => {
|
||||||
|
if !status.success() {
|
||||||
if errored {
|
|
||||||
yield Ok(Value {
|
yield Ok(Value {
|
||||||
value: UntaggedValue::Error(
|
value: UntaggedValue::Error(
|
||||||
ShellError::labeled_error(
|
ShellError::labeled_error(
|
||||||
@ -312,7 +311,11 @@ async fn run_with_stdin(
|
|||||||
),
|
),
|
||||||
tag: name_tag,
|
tag: name_tag,
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok(Some(stream.to_input_stream()))
|
Ok(Some(stream.to_input_stream()))
|
||||||
|
Loading…
Reference in New Issue
Block a user