mirror of
https://github.com/nushell/nushell.git
synced 2024-11-28 19:33:47 +01:00
Fix missing invocation errors (#1846)
This commit is contained in:
parent
b89976daef
commit
ae87582cb6
@ -198,6 +198,10 @@ async fn evaluate_invocation(
|
||||
|
||||
let output = result.into_vec().await;
|
||||
|
||||
if let Some(e) = context.get_errors().get(0) {
|
||||
return Err(e.clone());
|
||||
}
|
||||
|
||||
match output.len() {
|
||||
x if x > 1 => Ok(UntaggedValue::Table(output).into_value(Tag::unknown())),
|
||||
1 => Ok(output[0].clone()),
|
||||
|
@ -100,6 +100,16 @@ fn invocation_handles_dot() {
|
||||
})
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn argument_invocation_reports_errors() {
|
||||
let actual = nu!(
|
||||
cwd: ".",
|
||||
"echo $(ferris_is_not_here.exe)"
|
||||
);
|
||||
|
||||
assert!(actual.err.contains("Command not found"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn can_process_one_row_from_internal_and_pipes_it_to_stdin_of_external() {
|
||||
let actual = nu!(
|
||||
|
Loading…
Reference in New Issue
Block a user