volta
volta copied to clipboard
Implements `VOLTA_FEATURE_YARN=0`
I'm implementing a version manager for Yarn, and Volta gets in the way: every call to node corrupts the PATH by shadowing the existing yarn binary.
In theory Volta should be smarter and only update the PATH for binaries it's sure to own (see https://github.com/volta-cli/volta/issues/2053), but in practice this is likely to be a significant change and I doubt we have the bandwidth to land this kind of change medium term.
Instead, this PR implements a VOLTA_FEATURE_YARN=0 environment variable that, when set, will prevent Volta from shadowing the Yarn binary. Any wrapper meant to own the management of Yarn releases can then set this variable.