Skip to content

Commit

Permalink
Merge pull request #8443 from ehuelsmann/feature/external-template-en…
Browse files Browse the repository at this point in the history
…gine

External template engine (follow-up)
  • Loading branch information
ehuelsmann authored Oct 21, 2024
2 parents 0cfa339 + ba50b9c commit e48bb6f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Added functionalities
* Persistence of calculated taxes on orders and quotes (#8038)
* Database upgrade log inspection in setup.pl (#8363)
* Ship To 'At the attention of' (Ship To Attn) (#8360)
* Support for external template rendering engines like weasyprint (#8440)

Changed functionalities
* Sub-templates 'dynatable' merged into 'display_report' templates (#8380)
Expand Down
2 changes: 2 additions & 0 deletions doc/conf/ledgersmb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ output_formatter:
formats:
- bin
- binx
input_extension: bin
mime_type: application/binary

# !book: paths
#
Expand Down
3 changes: 3 additions & 0 deletions lib/LedgerSMB/Template/Plugin/External.pm
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ sub postprocess {
or warn "Unable to close template renderer stdin: $!";

waitpid $pid, 0;
my $exitcode = ($? >> 8);
die "External template renderer ($cmd) failed; exit code: $exitcode"
unless $exitcode == 0;

open my $res, '<', File::Spec->catfile( $dir, $self->rendered_output_name )
or die "Unable to read template processor output: $!";
Expand Down

0 comments on commit e48bb6f

Please sign in to comment.