Revert "Handle HYDRA_EMAIL_TEMPLATES that are paths"
This doesn't work as planned, will re-work.
This reverts commit d2ce7747a0
.
This commit is contained in:
parent
d2ce7747a0
commit
a168f43515
|
@ -12,7 +12,6 @@ use File::Slurp;
|
|||
use Template;
|
||||
use Hydra::Helper::Nix;
|
||||
use Hydra::Helper::CatalystUtils;
|
||||
use FileHandle;
|
||||
|
||||
|
||||
my $template = $ENV{'HYDRA_EMAIL_TEMPLATE'} || <<EOF;
|
||||
|
@ -93,19 +92,9 @@ sub buildFinished {
|
|||
};
|
||||
|
||||
my $body;
|
||||
if (-e $template) {
|
||||
my $fh = FileHandle->new($template, "r");
|
||||
if ($fh) {
|
||||
$template = $fh;
|
||||
}
|
||||
}
|
||||
$tt->process(\$template, $vars, \$body)
|
||||
or die "failed to generate email from template";
|
||||
|
||||
if (ref($template) eq "FileHandle") {
|
||||
$template->close();
|
||||
}
|
||||
|
||||
# stripping trailing spaces from lines
|
||||
$body =~ s/[\ ]+$//gm;
|
||||
|
||||
|
|
Loading…
Reference in a new issue