I'm trying to add a final new line at the end of a file. I tried to do so with AppendTask.
<append destFile="my-file.txt" text="${line.separator}"/>
The problem is this doesn't work because text is "sanitized" after:
|
private function sanitizeText(): void |
|
{ |
|
if (null !== $this->text && '' === trim($this->text)) { |
|
$this->text = null; |
|
} |
|
} |
I don't understand the rationale behind sanitizeText. But IMHO this method can be deleted, or maybe there's another way to simply append a new line ?
Thanks
I'm trying to add a final new line at the end of a file. I tried to do so with AppendTask.
The problem is this doesn't work because
textis "sanitized" after:phing/src/Phing/Task/System/AppendTask.php
Lines 350 to 355 in 0824c14
I don't understand the rationale behind
sanitizeText. But IMHO this method can be deleted, or maybe there's another way to simply append a new line ?Thanks