This change ensures that if .netlify is not a directory we remove it before we try to create it.
Alternatively, we could also error the build if the file is present?
For us to review and ship your PR efficiently, please perform the following steps:
[ ] Open a bug/issue before writing your code 🧑💻. This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or something that`s on fire 🔥 (e.g. incident related), you can skip this step.
[ ] Read the contribution guidelines 📖. This ensures your code follows our style guide and passes our tests.
[ ] Update or add tests (if any source code was changed or added) 🧪
Summary
Fixes https://app.bugsnag.com/netlify/netlify-build/errors/63b6daab56c5cf00082ee11f?event_id=63b6daab00a2f84cc76b0000&i=sk&m=nw
Also in the build log of the affected build I can see:
It seems some repos have
.netlify
as a file. For example: https://github.com/MailTape/MailTape.github.io/blob/master/.netlify Is this an old format of the config file? What is that? To me this looks like the CLI global config file.This change ensures that if
.netlify
is not a directory we remove it before we try to create it.Alternatively, we could also error the build if the file is present?
For us to review and ship your PR efficiently, please perform the following steps:
A picture of a cute animal (not mandatory, but encouraged)