export function findLocalToolVersions()

in tool.ts [165:185]


export function findLocalToolVersions(toolName: string, arch?: string) {
    let versions: string[] = [];

    arch = arch || os.arch();
    let toolPath = path.join(_getCacheRoot(), toolName);

    if (tl.exist(toolPath)) {
        let children: string[] = tl.ls('', [toolPath]);
        children.forEach((child: string) => {

            if (isExplicitVersion(child)) {
                let fullPath = path.join(toolPath, child, arch);
                if (tl.exist(fullPath) && tl.exist(`${fullPath}.complete`)) {
                    versions.push(child);
                }
            }
        });
    }

    return versions;
}