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

Can't specify a report file path using the tilde shortcut #2802

Closed
ghost opened this issue Jan 7, 2020 · 2 comments
Closed

Can't specify a report file path using the tilde shortcut #2802

ghost opened this issue Jan 7, 2020 · 2 comments

Comments

@ghost
Copy link

ghost commented Jan 7, 2020

When I use the following command

mkdir ~/foo && vendor/bin/phpcs --report=junit --report-junit="~/foo/phpcs.xml"

I get the error

ERROR: The specified junit report file path "~/foo/phpcs.xml" points to a non-existent directory

But the directory exists when I check using ls -l ~/

What am I doing wrong?

@gsherwood gsherwood added this to Idea Bank in PHPCS v3 Development via automation Jan 7, 2020
@gsherwood gsherwood added this to the 3.5.4 milestone Jan 7, 2020
@gsherwood gsherwood changed the title The specified junit report file path points to a non-existent directory Can't specify a report file path using the tilde shortcut Jan 7, 2020
@gsherwood
Copy link
Member

None of the CLI arguments used to set report file paths supported the tilde shortcut properly. They would have worked if you the files you specified already existed, but would always show an invalid directory error if not. I've fixed this now.

I also found and fixed a problem with --report-junit and the toher report-specific file path arguments where specifying a directory would throw a PHP error inside of a friendlier PHPCS error.

Thanks for reporting this. The fix will be in 3.5.4

PHPCS v3 Development automation moved this from Idea Bank to Ready for Release Jan 7, 2020
@ghost
Copy link
Author

ghost commented Jan 7, 2020

Oh excellent! At least I now know I wasn't being stupid!

Thank you for fixing this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
PHPCS v3 Development
Ready for Release
Development

No branches or pull requests

1 participant