tristanisham / zvm

zvm (Zig Version Manager) lets you easily install/upgrade between different versions of Zig.
https://www.zvm.app
MIT License
487 stars 32 forks source link

Updating master installs? #12

Closed foxnne closed 1 year ago

foxnne commented 1 year ago

Hi!

I've been using ZVM regularly for a while on both windows and macos, thanks for creating this!

The only thing I've run into that is a small bother, is that I have to go into .zvm and delete the master folder before running zvm i master to install the latest version of master, otherwise it seems to stick on the already installed version.

Am I missing some functionality to let me overwrite the installed master with a new version?

Thanks!

antlanc7 commented 1 year ago

I have the same issue. By the way, you can use zvm rm master to delete the previous version and then zvm i master to install the newer one.

foxnne commented 1 year ago

Ah thank you, that works!

antlanc7 commented 1 year ago

This is just a workaround, I think it would be better to have the program overwrite completely the folder of the zig version in that case, Or maybe add a new command line option to choose the desired behavior.

foxnne commented 1 year ago

I agree. It would be pretty nice in my opinion to move old master versions to a subfolder in case rollback is needed, I'm often doing this currently. Or some way to handle multiple master versions until we hit 1.0.

tristanisham commented 1 year ago

@foxnne, that's a pretty good idea! Let me do some testing tonight to see what I can do.

tristanisham commented 1 year ago

So this bug was actually a pretty easy fix. Go's been updating it's file-checking API a bunch and the version ZVM used no longer worked as intended. I updated it and now the true master version should be installed. I do like the idea of adding previous versions so you can easily rollback in a future update. This fix is coming out in v0.2.0 zvm-master-bug-fix

foxnne commented 1 year ago

Thanks!