Skip to content
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 return value for detecting yarn workspace plugin #905

Merged
merged 2 commits into from
Feb 26, 2021

Conversation

danielleadams
Copy link
Contributor

Fixes: #904

@danielleadams danielleadams requested a review from a team as a code owner February 26, 2021 22:26
lib/yarn-2.sh Outdated
path=""
fi

[[ ! "$path" == "" ]]
Copy link

@sargunv sargunv Feb 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend instead querying Yarn directly to see if the plugin is installed, to guard against potential changes in config format or location. Also use the full name @yarnpkg/plugin-workspace-tools to guard against potential third party plugins with a similar name but different behavior.

Something like:

yarn plugin runtime | grep '@yarnpkg/plugin-workspace-tools'

@danielleadams
Copy link
Contributor Author

@sargunv went ahead and made the recommended change. Didn't realize that was available. Thanks!

@sargunv
Copy link

sargunv commented Feb 26, 2021

Awesome, thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Yarn workspace-tools plugin not being detected
3 participants