File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change 11local distribution_version_parser = require (" distribution_version" )
22
33function PLUGIN :PreUse (ctx )
4- local distribution_version = distribution_version_parser .parse_version (ctx .version )
4+ local input_version = ctx .version
5+ local distribution_version = distribution_version_parser .parse_version (input_version )
6+
7+ -- If it is a pure numeric major version (such as "8"), and the distribution is openjdk, let the core perform fuzzy matching.
8+ if distribution_version and distribution_version .distribution .short_name == " open" then
9+ if not string.find (distribution_version .version , " %." ) then -- Pure numbers, no minor versions
10+ return " " -- Return empty, let vfox core perform fuzzy matching
11+ end
12+ end
13+
14+
515 if distribution_version and distribution_version .distribution .short_name ~= " open" then
616 return {
717 version = distribution_version .version .. " -" .. distribution_version .distribution .short_name
818 }
919 else
1020 return {
11- version = ctx . version ,
21+ version = input_version ,
1222 }
1323 end
14- end
15-
24+ end
You can’t perform that action at this time.
0 commit comments