sg: use `package.json` `packageManager` field to check `yarn` version
Created by: valerybugakov
Context
We install yarn v1
via asdf
and then use yarn v3
because of the package.json
packageManager
field. See more context in the yarn
upgrade PR.
This PR changes the logic of the sg setup -check
command for the yarn
version. It parses package.json
and extracts the yarn
version specified in the packageManager
field and compares it to the output of the yarn --version
command.
Test plan
yarn install
- ensure that
yarn --version
outputs3.2.3
. -
go run ./dev/sg setup -check
passed without errors.