Skip to content

Commit

Permalink
Correct [log type=error|debug] final newline behavior
Browse files Browse the repository at this point in the history
It shouldn't quote the final newline with > since ::logError
doesn't. (And because it makes a mess of the log.)
  • Loading branch information
jonjensen committed Apr 4, 2014
1 parent b05c2a4 commit d0b179e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Vend/Interpolate.pm
Expand Up @@ -2016,8 +2016,9 @@ sub log {
}
elsif($opt->{type} =~ /^(?:error|debug)/) {
if ($opt->{file}) {
$data =~ s/\n\z//;
$data = format_log_msg($data) unless $data =~ s/^\\//;;
$status = Vend::Util::writefile($file, $data, $opt);
$status = Vend::Util::writefile($file, $data . "\n", $opt);
}
elsif ($opt->{type} =~ /^debug/) {
$status = Vend::Util::logDebug($data);
Expand Down

0 comments on commit d0b179e

Please sign in to comment.