Giter Club home page Giter Club logo

Comments (8)

ljharb avatar ljharb commented on September 24, 2024 2

That would be blindly updating across breaking changes, and would be a terrible idea.

Duplicate of #400.

from nvm.

ljharb avatar ljharb commented on September 24, 2024 1

Nope, because master is often broken. Only tagged releases are safe to use.

from nvm.

emilfihlman avatar emilfihlman commented on September 24, 2024 1

@ljharb there are other use cases, like using cloud-init.

Please consider updating the release asset name to a well known sticky one, or at least providing another asset that always has a fixed name, like nvm.zip, so https://github.com/nvm-sh/nvm/releases/latest/download/nvm.zip could be used for automating installs with cloud-init. You can have the zip contents reflect on version if you wish.

from nvm.

ljharb avatar ljharb commented on September 24, 2024 1

@emilfihlman your use case still has the problem that breaking changes will be silently installed, risking breaking your workflow. The proper solution is to always hardcode a version number or semver range.

from nvm.

birgersp avatar birgersp commented on September 24, 2024

Just realised I can use this link:

https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh

from nvm.

emilfihlman avatar emilfihlman commented on September 24, 2024

Even better would be just to include the install.sh in the releases.

But in the mean time, here is a very hacky solution to getting the latest install script that doesn't rely on magic version numbers or creation of temporary files etc

curl -sL "$(curl -sL https://api.github.com/repos/nvm-sh/nvm/releases/latest | jq -r .zipball_url)" | busybox unzip -p - '*/install.sh' > nvm_install.sh

This should be quite easy to adapt to directly executing and installing the latest release node

from nvm.

emilfihlman avatar emilfihlman commented on September 24, 2024

@ljharb I think it's not for this package to be concerned about that.

The proper solution is definitely to not hardcore version numbers. That is the most awful thing to do.

from nvm.

ljharb avatar ljharb commented on September 24, 2024

@emilfihlman it is absolutely for nvm to be concerned about circumstances that could cause nvm users to have a broken experience.

Why is that the most awful thing to do? That's literally the universal consensus on all forms of dependencies in the entire security and tech ecosystem (too much, imo, even)

from nvm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.