Fix re-extraction of partially cleaned dart-sass cache#770
Open
pfranza wants to merge 1 commit into
Open
Conversation
The bundled package provider previously skipped extraction whenever the target temp directory contained any regular file. If an OS temp cleaner removed the dart-sass/sass executable but left the cache directory or other files behind, startup failed with “No (unique) executable file found”. Validate the extracted executable before returning it, and re-extract the archive when the cache is non-empty but the executable is missing or ambiguous. Add a regression test for the partial-cache-cleanup case.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This issue is that on my mac, after about a week the system cleans up the data in the /tmp folder where the dart executable is stored and throws the following error.
The bundled package provider previously skipped extraction whenever the target temp directory contained any regular file. If an OS temp cleaner removed the dart-sass/sass executable but left the cache directory or other files behind, startup failed with “No (unique) executable file found”.
Validate the extracted executable before returning it, and re-extract the archive when the cache is non-empty but the executable is missing or ambiguous. Add a regression test for the partial-cache-cleanup case.