Similar to the yarnPath config option in older versions of yarn, the idea is to allow loading the cache (and ideally populating it) from a local folder within the workspace rather than the user folder.
This allows a yarn binary to be checked into the repo, which is helpful for network isolated CI instances. With the current state, the switch cache must be populated at image build time. This adds complexity when updating yarn versions, as the image must contain all possible yarn versions that a PR/release might run against (both new and old, possibly more in some cases).
Having the binary be in the repo allows it to always be consistent, using the git worktree as a source of truth.
Similar to the
yarnPathconfig option in older versions of yarn, the idea is to allow loading the cache (and ideally populating it) from a local folder within the workspace rather than the user folder.This allows a yarn binary to be checked into the repo, which is helpful for network isolated CI instances. With the current state, the switch cache must be populated at image build time. This adds complexity when updating yarn versions, as the image must contain all possible yarn versions that a PR/release might run against (both new and old, possibly more in some cases).
Having the binary be in the repo allows it to always be consistent, using the git worktree as a source of truth.