-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Tool-cache not working with two-part version numbers
Problem
Tool-cache doesn't work with Advanced Installer versions like 22.9 because it expects semantic versioning format (major.minor.patch).
This causes slow builds due to unnecessary downloads.
Current behavior: Tool downloads every time instead of using cache, even when the tool is already in the cache folder:
Checking cache for advinst tool with version: 22.9
Tool not found in cache
Downloading advinst tool with version: 22.9
Extracting advinst tool
Expected behavior: Should not download if the tool is in the cache
Solution
Normalize version before calling tool-cache functions:
function normalizeVersion(version) {
const parts = version.split('.');
return parts.length === 2 ? `${version}.0` : version;
}Working Fix
I've tested this in my fork and it works:
Checking cache for advinst tool with version: 22.9
Normalized version 22.9 to 22.9.0 for tool-cache compatibility
Tool found in cache
Registering advinst tool
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels