mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 14:40:06 +02:00
make stderr works for failed external command (#11914)
# Description Fixes: #11913 When running external command, nushell shouldn't consumes stderr messages, if user want to redirect stderr. # User-Facing Changes NaN # Tests + Formatting Done # After Submitting NaN
This commit is contained in:
@ -158,6 +158,14 @@ fn basic_outerr_pipe_works() {
|
||||
assert_eq!(actual.out, "8");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn err_pipe_with_failed_external_works() {
|
||||
let actual =
|
||||
nu!(r#"with-env [FOO "bar"] { nu --testbin echo_env_stderr_fail FOO e>| str length }"#);
|
||||
// there is a `newline` output from nu --testbin
|
||||
assert_eq!(actual.out, "4");
|
||||
}
|
||||
|
||||
mod it_evaluation {
|
||||
use super::nu;
|
||||
use nu_test_support::fs::Stub::{EmptyFile, FileWithContent, FileWithContentToBeTrimmed};
|
||||
|
Reference in New Issue
Block a user