Closed bholloway closed 5 years ago
Ping @lukebatchelor
The CI is failing Node 4. Seems to be a known issue with yarn@latest.
LGTM! Thanks heaps @bholloway. Let me run this past Jamie quickly and we'll get this merged and released.
Ping @jamiebuilds . Looks G to me. You happy to merge?
Thanks heaps @bholloway
Released in 0.24.1
Alternative fix for #207 instead of existing PR #215.
src/utils/fs.js
In the
readLink
method there is a comment here stating code was copied fromnpm
cli [here]().The copied code doesn't have a fallback when the file is not a symlink.
However when we look further in
npm
cli. The copied code is used in such a way here as there is a fallback similar to what @Bloodb0ne has proposed in #215.In #215 the
try/catch
is duplicated incmdShim
whereas here I simply use the already safereadLink
method.~In this PR I also removed the unused
path-is-inside
dependency.~src/utils/symlinkPackageDependencies.js
In my testing I also received
... is not a symlink
error insymlinkPackageDependencies
for workspace packages that exposed bin scripts. In lerna these shims are not symlinks here and considered to be packages that were erroneously installed. They are removed here before relinking.In
bolt
I suspect it is correct to read the shim as if it is a symlink and continue, similar to what is done incmdShim
(as discussed above). From what I can seebolt
then tries to recreate the shim here which is presumably idempotent.