Add missing fallback case

This commit is contained in:
Jonathan Turner 2019-12-07 19:24:58 +13:00
parent d0a2888e88
commit d07dc57537
2 changed files with 2 additions and 30 deletions

View File

@ -133,36 +133,6 @@ async fn post_helper(
headers: &[HeaderKind], headers: &[HeaderKind],
row: Value, row: Value,
) -> ReturnValue { ) -> 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_tag = path.tag.clone();
let path_str = path.as_string()?.to_string(); let path_str = path.as_string()?.to_string();

View File

@ -89,6 +89,8 @@ pub(crate) async fn run_internal_command(
_ => {} _ => {}
} }
} }
} else {
yield Ok(tagged_contents)
} }
} }
CommandAction::EnterHelpShell(value) => { CommandAction::EnterHelpShell(value) => {