mirror of
https://github.com/zhigang1992/yarn.git
synced 2026-01-12 22:53:44 +08:00
* Support Darwin bash in bin/yarn
If the yarn binary is a symlink the `basepath` is not correctly resolved on OSX/Darwin.
For example take the following structure:
```
vendor/yarnpkg/yarn
vendor/bin/yarn -> ../yarnpkg/yarn/bin/yarn
```
And run yarn:
```
$ yarn
internal/modules/cjs/loader.js:582
throw err;
^
Error: Cannot find module '/Users/yarnpkg/yarn/bin/yarn.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
at Function.Module._load (internal/modules/cjs/loader.js:506:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
at startup (internal/bootstrap/node.js:285:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)
```
Since the symlink is not resolved the relative path in the symlink leads to the wrong path.
This PR, fixes that issue.
* Update CHANGELOG.md