diff --git a/dist/setup/index.js b/dist/setup/index.js index 47ec13c2..28116ff6 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -6948,9 +6948,15 @@ function ensureLocalInstaller(options) { } if (executablePath === "") { core.info(`Checking for cached ${tool}@${version}...`); - executablePath = tc.find(installerName, version, ...(options.arch ? [options.arch] : [])); - if (executablePath !== "") { - core.info(`Found ${installerName} cache at ${executablePath}!`); + // tc.find returns the name of the directory in which + // the cached file is located. + let cacheDirectoryPath = tc.find(installerName, version, ...(options.arch ? [options.arch] : [])); + if (cacheDirectoryPath !== "") { + core.info(`Found ${installerName} cache at ${cacheDirectoryPath}!`); + // Append the basename of the cached file to the directory + // returned by tc.find + executablePath = path.join(cacheDirectoryPath, installerName); + core.info(`executablePath is ${executablePath}`); } else { core.info(`Did not find ${installerName} ${version} in cache`); @@ -32031,7 +32037,7 @@ module.exports.safeLoad = safeLoad; /* 771 */ /***/ (function(module) { -module.exports = {"_args":[["cheerio@1.0.0-rc.3","/Users/jrodriguez/devel/setup-miniconda"]],"_from":"cheerio@1.0.0-rc.3","_id":"cheerio@1.0.0-rc.3","_inBundle":false,"_integrity":"sha512-0td5ijfUPuubwLUu0OBoe98gZj8C/AA+RW3v67GPlGOrvxWjZmBXiBCRU+I8VEiNyJzjth40POfHiz2RB3gImA==","_location":"/cheerio","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"cheerio@1.0.0-rc.3","name":"cheerio","escapedName":"cheerio","rawSpec":"1.0.0-rc.3","saveSpec":null,"fetchSpec":"1.0.0-rc.3"},"_requiredBy":["/get-hrefs"],"_resolved":"https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.3.tgz","_spec":"1.0.0-rc.3","_where":"/Users/jrodriguez/devel/setup-miniconda","author":{"name":"Matt Mueller","email":"mattmuelle@gmail.com","url":"mat.io"},"bugs":{"url":"https://github.com/cheeriojs/cheerio/issues"},"dependencies":{"css-select":"~1.2.0","dom-serializer":"~0.1.1","entities":"~1.1.1","htmlparser2":"^3.9.1","lodash":"^4.15.0","parse5":"^3.0.1"},"description":"Tiny, fast, and elegant implementation of core jQuery designed specifically for the server","devDependencies":{"benchmark":"^2.1.0","coveralls":"^2.11.9","expect.js":"~0.3.1","istanbul":"^0.4.3","jquery":"^3.0.0","jsdom":"^9.2.1","jshint":"^2.9.2","mocha":"^3.1.2","xyz":"~1.1.0"},"engines":{"node":">= 0.6"},"files":["index.js","lib"],"homepage":"https://github.com/cheeriojs/cheerio#readme","keywords":["htmlparser","jquery","selector","scraper","parser","html"],"license":"MIT","main":"./index.js","name":"cheerio","repository":{"type":"git","url":"git://github.com/cheeriojs/cheerio.git"},"scripts":{"test":"make test"},"version":"1.0.0-rc.3"}; +module.exports = {"_args":[["cheerio@1.0.0-rc.3","/work"]],"_from":"cheerio@1.0.0-rc.3","_id":"cheerio@1.0.0-rc.3","_inBundle":false,"_integrity":"sha512-0td5ijfUPuubwLUu0OBoe98gZj8C/AA+RW3v67GPlGOrvxWjZmBXiBCRU+I8VEiNyJzjth40POfHiz2RB3gImA==","_location":"/cheerio","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"cheerio@1.0.0-rc.3","name":"cheerio","escapedName":"cheerio","rawSpec":"1.0.0-rc.3","saveSpec":null,"fetchSpec":"1.0.0-rc.3"},"_requiredBy":["/get-hrefs"],"_resolved":"https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.3.tgz","_spec":"1.0.0-rc.3","_where":"/work","author":{"name":"Matt Mueller","email":"mattmuelle@gmail.com","url":"mat.io"},"bugs":{"url":"https://github.com/cheeriojs/cheerio/issues"},"dependencies":{"css-select":"~1.2.0","dom-serializer":"~0.1.1","entities":"~1.1.1","htmlparser2":"^3.9.1","lodash":"^4.15.0","parse5":"^3.0.1"},"description":"Tiny, fast, and elegant implementation of core jQuery designed specifically for the server","devDependencies":{"benchmark":"^2.1.0","coveralls":"^2.11.9","expect.js":"~0.3.1","istanbul":"^0.4.3","jquery":"^3.0.0","jsdom":"^9.2.1","jshint":"^2.9.2","mocha":"^3.1.2","xyz":"~1.1.0"},"engines":{"node":">= 0.6"},"files":["index.js","lib"],"homepage":"https://github.com/cheeriojs/cheerio#readme","keywords":["htmlparser","jquery","selector","scraper","parser","html"],"license":"MIT","main":"./index.js","name":"cheerio","repository":{"type":"git","url":"git://github.com/cheeriojs/cheerio.git"},"scripts":{"test":"make test"},"version":"1.0.0-rc.3"}; /***/ }), /* 772 */ diff --git a/src/installer/base.ts b/src/installer/base.ts index f6eefedb..b90b99af 100644 --- a/src/installer/base.ts +++ b/src/installer/base.ts @@ -46,13 +46,20 @@ export async function ensureLocalInstaller( if (executablePath === "") { core.info(`Checking for cached ${tool}@${version}...`); - executablePath = tc.find( + // tc.find returns the name of the directory in which + // the cached file is located. + let cacheDirectoryPath = tc.find( installerName, version, ...(options.arch ? [options.arch] : []) ); - if (executablePath !== "") { - core.info(`Found ${installerName} cache at ${executablePath}!`); + if (cacheDirectoryPath !== "") { + core.info(`Found ${installerName} cache at ${cacheDirectoryPath}!`); + + // Append the basename of the cached file to the directory + // returned by tc.find + executablePath = path.join(cacheDirectoryPath, installerName); + core.info(`executablePath is ${executablePath}`); } else { core.info(`Did not find ${installerName} ${version} in cache`); }