From d07dc575370f53c716912038155170e26c1baaa6 Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Sat, 7 Dec 2019 19:24:58 +1300 Subject: [PATCH] Add missing fallback case --- crates/nu_plugin_post/src/main.rs | 30 ----------------------------- src/commands/classified/internal.rs | 2 ++ 2 files changed, 2 insertions(+), 30 deletions(-) diff --git a/crates/nu_plugin_post/src/main.rs b/crates/nu_plugin_post/src/main.rs index 4b379db0d2..8e802a2995 100644 --- a/crates/nu_plugin_post/src/main.rs +++ b/crates/nu_plugin_post/src/main.rs @@ -133,36 +133,6 @@ async fn post_helper( headers: &[HeaderKind], row: Value, ) -> ReturnValue { - /* - let path = match call_info.args.nth(0).ok_or_else(|| { - ShellError::labeled_error( - "No file or directory specified", - "for command", - &call_info.name_tag, - ) - })? { - file => file, - }; - let path_tag = path.tag.clone(); - let body = match call_info.args.nth(1).ok_or_else(|| { - ShellError::labeled_error("No body specified", "for command", &call_info.name_tag) - })? { - file => file.clone(), - }; - let path_str = path.as_string()?.to_string(); - - let has_raw = call_info.args.has("raw"); - let user = call_info - .args - .get("user") - .map(|x| x.as_string().unwrap().to_string()); - let password = call_info - .args - .get("password") - .map(|x| x.as_string().unwrap().to_string()); - - let headers = get_headers(&call_info)?; - */ let path_tag = path.tag.clone(); let path_str = path.as_string()?.to_string(); diff --git a/src/commands/classified/internal.rs b/src/commands/classified/internal.rs index 8dad93fbed..2042707c41 100644 --- a/src/commands/classified/internal.rs +++ b/src/commands/classified/internal.rs @@ -89,6 +89,8 @@ pub(crate) async fn run_internal_command( _ => {} } } + } else { + yield Ok(tagged_contents) } } CommandAction::EnterHelpShell(value) => {