Fix external redirect (#3345)

* Fix external redirection

* Fix external redirection
This commit is contained in:
JT
2021-04-22 08:54:34 +12:00
committed by GitHub
parent 02d5729941
commit 3ad4e0348f
24 changed files with 164 additions and 91 deletions

View File

@ -206,16 +206,6 @@ impl Block {
self.infer_params();
}
pub fn set_redirect(&mut self, external_redirection: ExternalRedirection) {
if let Some(group) = self.block.last_mut() {
if let Some(pipeline) = group.pipelines.last_mut() {
if let Some(ClassifiedCommand::Internal(internal)) = pipeline.list.last_mut() {
internal.args.external_redirection = external_redirection;
}
}
}
}
pub fn has_it_usage(&self) -> bool {
self.block.iter().any(|x| x.has_it_usage())
}