Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fallback behavior on version set failure #29

Open
hendriknielaender opened this issue Mar 20, 2024 · 1 comment
Open

fallback behavior on version set failure #29

hendriknielaender opened this issue Mar 20, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@hendriknielaender
Copy link
Owner

In the case of a failure when setting a new Zig version, it would be more user-friendly for ZVM to automatically fallback to the last successfully installed and set Zig version. This fallback mechanism would ensure that the user's environment remains in a usable state, allowing them to continue working with the last known good configuration until they decide to address the issue that caused the version set operation to fail.

Steps to Reproduce

  1. Ensure ZVM is installed and a Zig version is currently set and being used.
  2. Attempt to set a new Zig version using ZVM to one that is invalid or will cause the set operation to fail (e.g., due to a typo in the version name or a temporary network issue).
  3. Observe that after the failure, the Zig version is unset, and commands relying on Zig will not work until the user manually intervenes.

Possible Solution

Implement a feature in ZVM where, upon a failed attempt to set a new Zig version, it automatically reverts to the most recently used version that was successfully installed and set. This could involve keeping a history of used versions and ensuring there's a quick way to revert to the previous state without user intervention.

@hendriknielaender hendriknielaender added the bug Something isn't working label Mar 20, 2024
@hendriknielaender
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant