feat!: stop throwing error when directories do not exist #6556
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
zip-it-and-ship-it is currently throwing an error when none of the function directories exist. I suspect this is a legacy artefact and I can't think of a good reason why this should be in place.
First of all, we're already checking the existence of these directories upstream of zip-it-and-ship-it. Also, these directories are a mixed bag of directories created by users and generated by frameworks, so it doesn't make sense to me that a user with a missing
netlify/functions
directory gets an error whereas another one doesn't because one has a.netlify/v1/functions
generated by a framework and the other one doesn't.I'm bumping a major version here because this is technically a breaking change.