Add ability to relink a channel (mainly dev)
It would be great if you could relink a channel like dev to a new location without having to undefault it then remove it first.
Something like juliaup link update dev <DIR>? I can take you up on this. Just need this clarification (or if you have a sample command in mind).
Maybe even simpler and just let juliaup update dev <PATH> work for already linked binaries.
Command update already exists, any other name we could think of? link update or relink seem more explicit/intuitive here.
https://github.com/JuliaLang/juliaup/blob/051886cff975564d3fdf09dcd5330d9764ccefc8/src/bin/juliaup.rs#L173
Also quickly verifying my approach here: Wouldn't relink just remove the channel from installed_channel and then just re-add it all in the same function? Is there any other way to go about this?
The problem is that right now you have to do 4 things if a link channel is your default
- Change default to a different channel
- Delete the link channel
- recreate link to new location
- change the default back to that link
It would be great if that was a single step. So if relink does all those steps that is great.
Best to also write out tests, I was OOO yesterday so didn't get to work on this. Will add some tests.