Skip to content

[Feature]: yarn set version doesn't respect current yarn path #5911

@appsforartists

Description

@appsforartists

Self-service

  • I'd be willing to implement a fix

Describe the bug

For compliance reasons, all external code in a repo must be in third_party; therefore, this is my yarn path:

yarnPath: third_party/.yarn/releases/yarn-3.2.1.cjs

when running yarn set 4.0.1, the upgrade was mistakenly placed in

.yarn/releases/yarn-4.0.1.cjs

To reproduce

echo "{}" >> package.json
yarn set version 3.2.1
mkdir third_party
mv ./.yarn ./third_party/.yarn
echo "yarnPath: third_party/.yarn/releases/yarn-3.2.1.cjs" > .yarnrc.yml
yarn set version 4.0.1

Environment

System:
    OS: macOS 14.0
    CPU: (8) arm64 Apple M1 Pro
  Binaries:
    Node: 20.9.0 - /private/var/folders/p0/kbnclsq57q96dg1kd3699mvc00_vh7/T/xfs-236b58fd/node
    Yarn: 1.22.19 - /private/var/folders/p0/kbnclsq57q96dg1kd3699mvc00_vh7/T/xfs-236b58fd/yarn
    npm: 10.1.0 - ~/.nvm/versions/node/v20.9.0/bin/npm
    pnpm: 8.10.0 - ~/.nvm/versions/node/v20.9.0/bin/pnpm

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions