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

Make index redirect warning case-sensitive #1077

Merged
merged 2 commits into from
Aug 8, 2019

Conversation

cybrox
Copy link
Contributor

@cybrox cybrox commented Aug 8, 2019

This intends to fix #1076

Tests are passing on both, case-sensitive system (Arch Linux with ext4) and case-insensitive system (OSX with ... uhm, their FS). Also, a warning is now correctly displayed on OSX.

I adjusted the test to cover this case as well, however, it doesn't really prove much. Not sure if this suffices or if we have to think of some way to actually make this behaviour testable on any system. - I couldn't think of an easy way of simulating the case-insensitive behaviour on my work machine / the CI)

lib/ex_doc/formatter/html.ex Outdated Show resolved Hide resolved
Copy link
Member

@ericmj ericmj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Thank you! 💜

defp case_sensitive_file_regular?(path) do
if File.regular?(path) do
files = path |> Path.dirname() |> File.ls!()
file = path |> Path.basename()
Copy link
Contributor

@eksperimental eksperimental Aug 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for the pipe operator in this line

@josevalim josevalim merged commit ac0f1d2 into elixir-lang:master Aug 8, 2019
@josevalim
Copy link
Member

❤️ 💚 💙 💛 💜

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.

Warn if :main does not point to an existing file
4 participants