-
Notifications
You must be signed in to change notification settings - Fork 330
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
Possible error when deprecating binaries path for assets #1924
Comments
We should fix this I think. I wonder if we should do it by explicitly discarding .gitignore or by discarding everything starting with |
Since |
I decided to keep all assets because we do a recursive traversal and skipping dot files in there would require adding a feature to Elixir first. Which basically means the empty .gitignore file will be part of the assets. If that's an issue, let me know, I will be glad to revisit it. :) |
Sounds good to me. I did an attempt att solving this and ended up with this hack: is_binary(dir_or_files) and File.dir?(dir_or_files) ->
dir_or_files
|> File.cp_r!(target_dir)
|> Enum.filter(fn path ->
## Remove any file that starts with a .
if path |> Path.basename() |> String.first() != "." do
File.rm!(path)
false
else
true
end
end)
|> Enum.map(&Path.relative_to(&1, output)) |
Before f4a46cb it was possible to have hidden files in the asset folder without them being included in the build. For instance we had a
.gitignore
file in the assets folder.With f4a46cb it is no longer possible and we get this error:
It is not a big problem for us to remove the
.gitignore
, just opening this issue to see if the original behaviour was intentional or not.The text was updated successfully, but these errors were encountered: