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.
Node's
process.cwd()
has different behaviour between unix OS's and Windows when the cwd is inside a symlink. This PR fixes this inconsistency by calling node'sfs.realpathSync
to follow the directory symlink and simulate unix's behaviour on Windows.This incosistency causes patch-package to fail on Windows when it runs on a postinstall of a workspace package since yarn (and possibly other package managers as well) use symlinks to hoist packages to the root node_modules.
This PR also fixes the path comparison on the
getAppRootPath
, since Windows can have both\
and/
path separators.