Skip to content
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

DirSet toString returns files #1669

Closed
twoseascharlie opened this issue Jan 28, 2022 · 0 comments · Fixed by #1670
Closed

DirSet toString returns files #1669

twoseascharlie opened this issue Jan 28, 2022 · 0 comments · Fixed by #1670
Milestone

Comments

@twoseascharlie
Copy link
Contributor

Describe the bug
Using anything that would cause a DirSet toString returns files instead of directories.

Steps To Reproduce
Example build.xml:

<?xml version="1.0"  encoding="UTF-8" ?>

<project name="tmp.testing" basedir="." default="tmp.test.dirs">
    <property environment="env" />
    <property name="source.root" value="${phing.dir}" />
    <echo msg="source.root: ${source.root}" />

    <target name="tmp.test.dirs">
        <dirset id="dist.contents" dir="${source.root}" includes="src/**">
        </dirset>
        
        <property name="prop.dist.contents" refid="dist.contents"/>
        <echo msg="prop.dist.contents: ${prop.dist.contents}" />
    </target>

    <target name="tmp.test.files">
        <fileset id="dist.contents" dir="${source.root}" includes="src/**">
        </fileset>
        
        <property name="prop.dist.contents" refid="dist.contents"/>
        <echo msg="prop.dist.contents: ${prop.dist.contents}" />
    </target>

</project>

Check files:

 $ phing tmp.test.files
Buildfile: /var/www/html/checkHookPlugin/build.xml
     [echo] source.root: /var/www/html/checkHookPlugin

tmp.testing > tmp.test.files:

     [echo] prop.dist.contents: src/plugins/check-hooks/autoload/MainAutoload.php;src/plugins/check-hooks/main/activate/ActivatePlugin.php;src/plugins/check-hooks/plugin-main.php

BUILD FINISHED

Total time: 0.1959 seconds

Check directories:

$ phing -f buildtemp.xml tmp.test.dirs
Buildfile: /var/www/html/checkHookPlugin/build.xml
     [echo] source.root: /var/www/html/checkHookPlugin

tmp.testing > tmp.test.dirs:

     [echo] prop.dist.contents: src/plugins/check-hooks/autoload/MainAutoload.php;src/plugins/check-hooks/main/activate/ActivatePlugin.php;src/plugins/check-hooks/plugin-main.php

BUILD FINISHED

Total time: 0.1916 seconds

Expected behavior
Only directories should be listed with DirSet

Screenshots / terminal output
See above

Additional context
This is using latest of phing/main.

twoseascharlie added a commit to twoseascharlie/phing that referenced this issue Jan 28, 2022
fixes phingofficial#1669

Signed-off-by: Charlie Cadwell <twoseascharlie@gmail.com>
@mrook mrook added this to the 3.0.0-RC4 milestone Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants