-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Clarifier: I am new to the mise/vfox/asdf ecosystem, so apologies if I misunderstand something
Looking at issue #3 which was supposed to be fixed by #4, I think there is more to the fix.
On windows, when I run mise install dotnet using mise version 2025.8.7 windows-x64 (2025-08-06) I get the following output:
mise ERROR Failed to install tool: dotnet@latest
Individual error details:
1. dotnet@latest:
Error {
msg: "failed to install vfox:[email protected]",
source: LuaError(
FromLuaConversionError {
from: "table",
to: "PreInstall",
message: Some(
"no version returned from vfox plugin",
),
},
),
}
I did some debugging into this, for example if we look at pre_install.lua below:
vfox-dotnet/hooks/pre_install.lua
Lines 9 to 19 in da580ed
| function PLUGIN:PreInstall(ctx) | |
| local releases = util:getAvailableByUserVersion(ctx.version) | |
| for _, release in ipairs(releases) do | |
| if strings.has_prefix(release.version, ctx.version) then | |
| return release | |
| end | |
| end | |
| return {} | |
| end |
The properties of a release (as populated by util:getAvailableByChannelReleaseUrl) are:
- Download URL: https://builds.dotnet.microsoft.com/dotnet/Sdk/9.0.304/dotnet-sdk-9.0.304-win-x64.zip
- Note: secure, 2025-08-05
- SHA512: 252db975bca487d1f5abca021ba79a067d42072464f7b336651a74f623b47cefc898d635f799ae0a63bafb823a5dd741b0c7bcd9078d0467235e8b57e0101f02
- Addition (name): dotnet-sdk-win-x64.zip
- Addition (version): 9.0.304
- Version: 9.0.7
If we change the logic on line 13 to the following:
function PLUGIN:PreInstall(ctx)
local releases = util:getAvailableByUserVersion(ctx.version)
for _, release in ipairs(releases) do
- if strings.has_prefix(release.version, ctx.version) then
+ if strings.has_prefix(release.addition[1].version, ctx.version) then
return release
end
end
return {}
end Then the installation works. I'm happy to submit a PR to fix this, and maybe make it so that rather than indexing the property by release.addition[1].version it's set as release.sdk-version, but wanted to open the issue to confirm that this is the correct path forward first.