-
Notifications
You must be signed in to change notification settings - Fork 263
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
fix(exec): default to @latest version #1926
Conversation
Addresses a bug with `mise exec` where using an unversioned tool reference causes the underlying binary to not be installed on first use. Instead we treat an unqualified tool as having tool@latest and handle that in the else clause.
it seems I had been working on this myself a while ago but for some reason I couldn't get it to work correctly https://github.com/jdx/mise/pull/1247/files |
This reverts commit 4952e54.
Addresses a bug with `mise exec` where using an unversioned tool reference causes the underlying binary to not be installed on first use. Instead we treat an unqualified tool which has no current install as having tool@latest and handle that in the else clause. The desired behavior is: eg mise x cargo:eza - If any version of cargo:eza exists, use it - If no version exists, install latest
I see why it's tough to change. I spent more time on it yesterday but didn't come to a good solution. I'm going to focus on the pipx backend PR and the gh releases backend and then this is my next interest to fix. |
Yeah apologies for leading you down this path without warning you that it's a lot tougher than it appears but I completely forgot about these issues. I'll try to find some time this week myself to poke around with it and see if I can either come up with a solution or at least a sketch of one. |
glanced at this a bit and noticed I can't get the unit tests to pass locally either but wasn't able to figure out why. Only had a few minutes to spare so wasn't able to dive in further but hopefully one of us can track down what is going on in the unit tests. I suspect in some of the setup |
mise x cargo:eza
not installing during run when tool's version is unqualified
I don't love this solution since it makes things quite complex to reason about but I think it's the behavior we want |
Addresses a bug with
mise exec
where using an unversioned tool reference causes the underlying binary to not be installed on first use.Instead we treat an unqualified tool as having tool@latest and handle that in the else clause.
Discord discussion/question:
Closes #1247