Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This makes yarn link work when $HOME/.config/yarn/link/ is itself a symlink. ---- The following commit forces symlinks to be relative: 36d73cc This isn't ideal, although it enables some portability it breaks others. For example, it is not uncommon for `$HOME/.config` itself to be be a symlink: `$HOME/.config` -> `$HOME/src/stefanpenner/dotfiles`. Now when running `yarn link` inside `$HOME/src/ember-cli/ember-cli` we end up with: ```js path.relative('/Users/spenner/.config/yarn/link/ember-cli', '/Users/spenner/src/ember-cli/ember-cli'); => '../../../src/ember-cli/ember-cli' ``` Which results in the link located at: `/Users/spenner/.config/yarn/link/ember-cli` pointing to `/Users/spenner/.config/src/ember-cli/ember-cli` rather then `/Users/spenner/src/ember-cli/ember-cli` This is because `/Users/spenner/.config` is actually a symlink pointing to `/Users/spenner/src/stefanpenner/dotfiles/.config/` --- This PR provides mitigate the issue raised in #2096, but reifying the paths via `realpathSync` before deriving the relative path. This doesn't fix all issues, e.g. symlinks cannot be changed after this reification.
- Loading branch information