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

Add support for directory creation to --output-file flag #5670

Closed
dreyks opened this issue Oct 29, 2021 · 2 comments · Fixed by #5672
Closed

Add support for directory creation to --output-file flag #5670

dreyks opened this issue Oct 29, 2021 · 2 comments · Fixed by #5672
Labels
status: ready to implement is ready to be worked on by someone type: enhancement a new feature that isn't related to rules

Comments

@dreyks
Copy link
Contributor

dreyks commented Oct 29, 2021

What is the problem you're trying to solve?

when using the --output-file CLI option non-existing folders are not created resulting in a crash when trying to write

What solution would you like to see?

create the directory path before writing the output, similar to how eslint does this https://github.com/eslint/eslint/blob/4e9c6edcf8d11ec31354cdd853bec0308fa70aff/lib/cli.js#L193-L194

If you're interested, I can send a PR

@jeddy3 jeddy3 changed the title make output-file create directories along its way Add support for directory creation to --output-file flag Oct 29, 2021
@jeddy3 jeddy3 added status: ready to implement is ready to be worked on by someone type: enhancement a new feature that isn't related to rules labels Oct 29, 2021
@jeddy3
Copy link
Member

jeddy3 commented Oct 29, 2021

Thanks for the request and for using the template. Sounds good to me.

If you're interested, I can send a PR

Yes, please!

@dreyks
Copy link
Contributor Author

dreyks commented Oct 29, 2021

#5672

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready to implement is ready to be worked on by someone type: enhancement a new feature that isn't related to rules
Development

Successfully merging a pull request may close this issue.

2 participants