A random set of fixes (#1600)

This commit is contained in:
Jonathan Turner
2020-04-17 18:19:49 +12:00
committed by GitHub
parent ee778d2b03
commit 52d2d2b888
4 changed files with 29 additions and 8 deletions

View File

@@ -444,6 +444,8 @@ fn spawn(
process.arg("/c");
process.arg(&command.name);
for arg in args {
// Clean the args before we use them:
let arg = arg.replace("|", "\\|");
process.arg(&arg);
}
process

View File

@@ -76,6 +76,12 @@ impl PerItemCommand for Help {
return Ok(
get_help(&command.name(), &command.usage(), command.signature()).into(),
);
} else {
return Err(ShellError::labeled_error(
"Can't find command (use 'help commands' for full list)",
"can't find command",
tag,
));
}
let help = futures::stream::iter(help);
Ok(help.to_output_stream())