Prevent crash when using @tailwindcss/cli using --watch on Windows#20242
Merged
Conversation
At least at this point in time. We'll pass through the absolutely resolved real path.
Contributor
Confidence Score: 5/5Safe to merge — the change is narrowly scoped to filtering non-existent paths before setting up file watchers, with no effect on the build pipeline itself. The fix is minimal and well-contained: only No files require special attention. Reviews (2): Last reviewed commit: "Update integrations/cli/index.test.ts" | Re-trigger Greptile |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
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 PR fixes an issue on Windows where the
@tailwindcss/cliwith the--watchflag crashes when using a@sourcewith a base path that doesn't exist on disk.This happens when setting up the
@parce/watcherfor directories that don't exist. This PR essentially filters out these directories that don't exist on disk to prevent the crash.It might be that if you add the folder later, while the watcher is already watching, that you have to restart the
@tailwindcss/cli(or save theindex.css(the file that contains the@sourcedirectives), this also recreates watchers from scratch).If this issue causes problems for
@tailwindcss/postcssand@tailwindcss/vitein the future as well, then we can move this logic back to Oxide. We do maintain the incoming@sourcefiles as best as possible without resolving to absolute paths. Back when we did resolve them, if that process error'd we just never returned the glob.The root cause is still referencing folders that don't exist.
Fixes: #20231
Test plan
[ci-all]