-
-
Notifications
You must be signed in to change notification settings - Fork 560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(core-utils): trim spawnPackageManager
output
#3866
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! spawnPackageManager
is also used in a few other places, we should probably do the trimming directly in spawnPackageManager
before returning the result, so that all consumers get trimmed strings. Could you make that change?
Yes sir ! |
Hi @erikian, thanks for your feedback. i have implemented the requested changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just one minor suggestion.
Implemented the suggested changes. |
Fixes #3864 by @mato533
Summarize your changes:
.trim()
to pnpm config get outputs:hoistPattern
,publicHoistPattern
, andnodeLinker
to use.trim()
on the results ofspawnPackageManager
. This removes trailing newlines (\n
) from thepnpm config get
output, ensuring accurate string comparisons."undefined\n" !== 'undefined'
caused the check to misinterpret unset values as custom configurations."undefined\n".trim()
becomes"undefined"
, correctly triggering the node-linker check when hoist patterns are unset.