jbangdev / jbang

Unleash the power of Java - JBang Lets Students, Educators and Professional Developers create, edit and run self-contained source-only Java programs with unprecedented ease.
https://jbang.dev
MIT License
1.43k stars 159 forks source link

"zero install" should live up to its name #1218

Open quintesse opened 2 years ago

quintesse commented 2 years ago

Right now when you do curl sh.jbang.dev | bash -s - you're basically performing a regular installation, the only difference being that no changes are being made to your environment (eg. PATH).

This is perhaps efficient because you don't have to download Jbang on each invocation, but it also means that we have a conflict when an older version Jbang is already installed. We'd either have to overwrite/update the version automatically, which the user might not want/expect, or we'd use the existing version, when the user perhaps expects access to the latest features.

I would suggest that we download to a temporary location that would be automatically cleaned up when Jbang exits. It's less efficient but it will make sure that we always run the latest version without any conflicts with installed Jbang versions.

quintesse commented 2 years ago

PR was reverted. Reopening.