Commit 08f8981
authored
fix: don’t try to chmod unlinked files (npm#80)
`linkGently` would return true if a link target had been visited before.
`linkBin` would then chmod the link `to`, regardless of whether this
file exists. This causes `npm install` to fail if multiple packages link
to a non-existent bin with the same name.
By returning false in `linkGently`, `linkBin` no skips the chmod on the
non-existent file.
## References
Fixes npm#45971 parent f24eddb commit 08f8981
2 files changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
0 commit comments