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

Safety check before running File.rm_rf! in doc gen #1707

Merged
merged 3 commits into from May 29, 2023

Conversation

viniciusmuller
Copy link
Contributor

@viniciusmuller viniciusmuller commented May 21, 2023

This pull requests adds a safety check before running Fille.rm_rf! when creating docs.

Now it will only allow users to select as output either:

  • Unexisting directories (which will be created by ex_doc)
  • Directories already managed by ex_doc (have the .ex_doc file)

One I think inevitable outcome of this is that this is a breaking change, users with existing docs folders that try to run it in a new version will receive the error message.

Maybe we can add a line in the error saying Run "rm -rf docs" if you are seeing this after upgrading ex_doc

Closes #1555

@viniciusmuller
Copy link
Contributor Author

Is there anything that still needs to be done in this PR?

@josevalim josevalim merged commit 9766ed7 into elixir-lang:main May 29, 2023
1 of 3 checks passed
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

josevalim added a commit that referenced this pull request Oct 20, 2023
Unfortunately this is generating ExDoc files with mixed entries.

This reverts commit 9766ed7.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

ExDoc could potentially wipe out any directory
2 participants