-
-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document sanitizing of text in Append task #1673
Comments
Hi @jawira did you try with fixLastLine Attribute set to true? |
Hi @siad007 ! Thanks for replying :) I just tried to use BUILD FAILED
/home/jawira/PhpstormProjects/xxxxxx/build.xml:236:59 You must specify a file, use a filelist/fileset, or specify a text value.
Total time: 0.0444 seconds I'm more curious about why I can make a PR if required. Since this is not very important, you can also close this issue if you want :) |
Hi @jawira - sry for that long delay. Looking here a little bit closer, we have a bug here.
AFAIK This is needed against empty text arguments like Things that should work are at least: <?xml version="1.0" encoding="UTF-8" ?>
<project name="test" default="one">
<target name="one">
<append destFile="my-file.txt" text="${line.separator}"/>
</target>
<target name="two">
<append destFile="my-file.txt" text="
"/>
</target>
<target name="three">
<append destFile="my-file.txt" text=" "/>
</target>
</project> |
Actually, this is by design and matches the way the Concat task works in Ant. This is because adding a nested |
@mrook 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
text
is "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
The text was updated successfully, but these errors were encountered: