lilactown / plum

Eclipse Public License 2.0
22 stars 2 forks source link

Supporting custom installation location #2

Closed teodorlu closed 5 years ago

teodorlu commented 5 years ago

Hello!

Creating this as an issue as per requested in the ClojureVerse thread.

Usage issue. At the end of plum update (source), plum manually installs into /usr/local/bin/plum. At the same time,

  1. plum is installed into the user-specific location ~/.plum
  2. The rest of the installer runs fine without sudo (on Ubuntu), whereas the last line crashes when run without root permissions.

Personal installation preference. I like having things I test out "that's not installed as serious applications" in ~/.local/bin. For instance, my lein goes here. In this case, I wanted all the plum update behavior except for the line referenced above. Instead, to expose the installation on path, I symlinked the script with ln -s ~/.plum/plum ~/.local/bin/. However, I'm going to have it complain a little the next time I update.

Options. Asking the user to put the script on path would work for me. This is what Leiningen does. It does more than that, however, and is more complex. Leiningen also requires the user to update to new versions -- this may not be the behavior you'd be interested in.

Finally, to be clear, I'm not trying to pull apart what you're doing here. I'm feeling the pain you're aiming at. I feel fairly comfortable with Leiningen. It's a unit; cohesive. I really like deps.edn, but it's really distributed, so as you say, one has to build one's own set of tools to work with it.

Teodor

lilactown commented 5 years ago

Yep, I think that a "simple" fix is to use a symlink and have the user put that symlink themselves.

After that, running plum update will run git pull inside ~/.plum/ and the script will be updated to the latest version via the symlink.

This is good feedback! I want this tool to be friendly to all sorts of environments.

I've opened https://github.com/Lokeh/plum/pull/3 that should address this. Would you mind reviewing it?

lilactown commented 5 years ago

An option would be to include an install script that could prompt the user for the location they would like to install it to for maximal ease. 😀

teodorlu commented 5 years ago

WIth #3, there are no annoyances in the update process for me :+1:

Added a small suggestion on the README wording -- use if it you think it's good.