website icon indicating copy to clipboard operation
website copied to clipboard

Allow latest and nightly versions under --version flag in install script

Open vikr01 opened this issue 6 years ago • 3 comments

In environments like Netlify, the --version flag is enforced when installing yarn. Allowing latest and nightly to get the latest version of yarn is a simple change that could allow anyone to easily use the latest versions of yarn.

vikr01 avatar Dec 04 '18 07:12 vikr01

Deploy preview for yarnpkg ready!

Built with commit ac6362d143535028b704e175927f9663400751f8

https://deploy-preview-891--yarnpkg.netlify.com

DanBuild avatar Dec 04 '18 07:12 DanBuild

Ideally you should be using a hard-coded version number here, otherwise your build could suddenly break when a new Yarn version is released.

Could you please provide an example of how you'd use this with Netlify? Where do you specify the Yarn version?

Daniel15 avatar Dec 04 '18 08:12 Daniel15

@Daniel15 For Netlify, the YARN_VERSION environment variable has to be set or it defaults to 1.3.2. It can be set either on Netlify's site, or through netlify.toml.

I'm not sure if this sort of behavior exists on any other environments, which is why I think it's good for the install script to have it. I can PR Netlify otherwise.

vikr01 avatar Dec 04 '18 08:12 vikr01