Now, there's not a lot going on here, but here's what else I was able to find:
{ stdio: 'ignore' } plays a role, the same thing will happen with { stdio: 'pipe' }, but it actually succeeds with { stdio: 'inherit' } 🤯
This lineseems to be the culprit - there's no need to quote-wrap arguments passed down to spawn
On yarn's side, this function is the blowup point - when normalizePattern('"lodash@^4"') is invoked, it produces the following: { name: '"lodash', range: '^4"', hasVersion: true }
I'm very uncertain as to why stdio: 'inherit' succeeds, but it looks like quote-wrapping the args is redundant and can be safely removed.
"
causes yarn to fail parsing package name correctly under certain conditionsNow, this one is truly weird, but easily reproducible:
node
,bolt
, andyarn
(could actually be any package)
this will fail, which is the bug
Now, there's not a lot going on here, but here's what else I was able to find:
{ stdio: 'ignore' }
plays a role, the same thing will happen with{ stdio: 'pipe' }
, but it actually succeeds with{ stdio: 'inherit' }
🤯spawn
normalizePattern('"lodash@^4"')
is invoked, it produces the following:{ name: '"lodash', range: '^4"', hasVersion: true }
I'm very uncertain as to why
stdio: 'inherit'
succeeds, but it looks like quote-wrapping the args is redundant and can be safely removed.