node-orb
node-orb copied to clipboard
yarn-install fails if other version of yarn installed
Orb version: 5.0.2
What happened:
When executing install-yarn and there is an existing version of yarn installed that is different, the install fails.
Snippet of usage:
- node/install-yarn:
version: '<<pipeline.parameters.yarn_version>>'
yarn_version pipeline parameter is set to 1.22.18
Output:
Selected version of Yarn is 1.22.18
Checking if YARN is already installed...
A different version of Yarn is installed (1.22.17); removing it
Installing YARN v1.22.18
mv: rename yarn-v1.22.18/* to /opt/yarn/*: No such file or directory
Exited with code exit status 1
Expected behavior:
Yarn v1.22.18 should be installed
Additional Information:
operating system: MacOS although I've seen this happen on Linux too
macos:
xcode: '13.2.1'
resource_class: 'medium'