Commit af72e6a
Support Darwin bash in bin/yarn (#6568)
* 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.md1 parent f6d0a5b commit af72e6a
2 files changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
0 commit comments