diff options
Diffstat (limited to 'src/poem/elements/verse')
-rw-r--r-- | src/poem/elements/verse/logic.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/poem/elements/verse/logic.rs b/src/poem/elements/verse/logic.rs index c1d3d62..f5efdee 100644 --- a/src/poem/elements/verse/logic.rs +++ b/src/poem/elements/verse/logic.rs @@ -28,6 +28,11 @@ macro_rules! incant { $command.stderr(Stdio::piped()); } + // Capture stdout if (f)orce (c)apture is set + if $env.fc { + $command.stdout(Stdio::piped()); + } + // Detach the process group, if in the [Rune::Quiet] meter if $self.meter == Rune::Quiet { $command.process_group(0); @@ -59,6 +64,9 @@ macro_rules! incant { $out.append(&mut output.stdout); err.append(&mut output.stderr); } + if $env.fc { + $out.append(&mut output.stdout); + } } Rune::Couplet => { output = child.wait_with_output()?; @@ -210,7 +218,7 @@ macro_rules! incant { } err.clear(); - if $self.meter != Rune::Couplet { + if $self.meter != Rune::Couplet && $env.fc != true { $out.clear(); } |