diff --git a/__tests__/installer.test.ts b/__tests__/installer.test.ts index 37dc5215..591e4018 100644 --- a/__tests__/installer.test.ts +++ b/__tests__/installer.test.ts @@ -1,19 +1,18 @@ -import installer = require('../src/installer'); import io = require('@actions/io'); import fs = require('fs'); import os = require('os'); import path = require('path'); const toolDir = path.join(__dirname, 'runner', 'tools'); - const tempDir = path.join(__dirname, 'runner', 'temp'); +process.env['RUNNER_TOOLSDIRECTORY'] = toolDir; +process.env['RUNNER_TEMPDIRECTORY'] = tempDir; +import * as installer from '../src/installer'; + describe('installer tests', () => { beforeAll(() => {}); beforeAll(async () => { - // TODO - these should eventually be changed to match new method of loading dir - process.env['Runner.ToolsDirectory'] = toolDir; - process.env['Runner.TempDirectory'] = tempDir; await io.rmRF(toolDir); await io.rmRF(tempDir); }); @@ -63,7 +62,7 @@ describe('installer tests', () => { }, 100000); it('Uses version of node installed in cache', async () => { - const nodeDir: string = path.join(toolDir, '250.0.0', os.arch()); + const nodeDir: string = path.join(toolDir, 'node', '250.0.0', os.arch()); await io.mkdirP(nodeDir); fs.writeFileSync(`${nodeDir}.complete`, 'hello'); // This will throw if it doesn't find it in the cache (because no such version exists) @@ -72,7 +71,7 @@ describe('installer tests', () => { }); it('Doesnt use version of node that was only partially installed in cache', async () => { - const nodeDir: string = path.join(toolDir, '250.0.0', os.arch()); + const nodeDir: string = path.join(toolDir, 'node', '250.0.0', os.arch()); await io.mkdirP(nodeDir); let thrown = false; try { @@ -86,7 +85,7 @@ describe('installer tests', () => { }); it('Resolves semantic versions of node installed in cache', async () => { - const nodeDir: string = path.join(toolDir, '250.0.0', os.arch()); + const nodeDir: string = path.join(toolDir, 'node', '250.0.0', os.arch()); await io.mkdirP(nodeDir); fs.writeFileSync(`${nodeDir}.complete`, 'hello'); // These will throw if it doesn't find it in the cache (because no such version exists) diff --git a/lib/installer.js b/lib/installer.js index d7caee39..f5b639bc 100644 --- a/lib/installer.js +++ b/lib/installer.js @@ -15,6 +15,8 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", { value: true }); +// Load tempDirectory before it gets wiped by tool-cache +let tempDirectory = process.env['RUNNER_TEMPDIRECTORY'] || ''; const core = __importStar(require("@actions/core")); const io = __importStar(require("@actions/io")); const tc = __importStar(require("@actions/tool-cache")); @@ -24,6 +26,22 @@ const path = __importStar(require("path")); const semver = __importStar(require("semver")); let osPlat = os.platform(); let osArch = os.arch(); +if (!tempDirectory) { + let baseLocation; + if (process.platform === 'win32') { + // On windows use the USERPROFILE env variable + baseLocation = process.env['USERPROFILE'] || 'C:\\'; + } + else { + if (process.platform === 'darwin') { + baseLocation = '/Users'; + } + else { + baseLocation = '/home'; + } + } + tempDirectory = path.join(baseLocation, 'actions', 'temp'); +} function getNode(versionSpec) { return __awaiter(this, void 0, void 0, function* () { // check cache @@ -140,7 +158,7 @@ function acquireNode(version) { downloadPath = yield tc.downloadTool(downloadUrl); } catch (err) { - if (err['httpStatusCode'] && err['httpStatusCode'] === '404') { + if (err instanceof tc.HTTPError && err.httpStatusCode == 404) { return yield acquireNodeFromFallbackLocation(version); } throw err; @@ -179,7 +197,7 @@ function acquireNodeFromFallbackLocation(version) { return __awaiter(this, void 0, void 0, function* () { // Create temporary folder to download in to let tempDownloadFolder = 'temp_' + Math.floor(Math.random() * 2000000000); - let tempDir = path.join(__dirname, tempDownloadFolder); + let tempDir = path.join(tempDirectory, tempDownloadFolder); yield io.mkdirP(tempDir); let exeUrl; let libUrl; @@ -192,7 +210,7 @@ function acquireNodeFromFallbackLocation(version) { yield io.mv(libPath, path.join(tempDir, 'node.lib')); } catch (err) { - if (err['httpStatusCode'] && err['httpStatusCode'] === '404') { + if (err instanceof tc.HTTPError && err.httpStatusCode == 404) { exeUrl = `https://nodejs.org/dist/v${version}/node.exe`; libUrl = `https://nodejs.org/dist/v${version}/node.lib`; const exePath = yield tc.downloadTool(exeUrl); diff --git a/node_modules/@actions/core/package.json b/node_modules/@actions/core/package.json index 713a7830..8da57683 100644 --- a/node_modules/@actions/core/package.json +++ b/node_modules/@actions/core/package.json @@ -1,5 +1,5 @@ { - "_from": "file:toolkit/actions-core-0.1.0.tgz", + "_from": "file:toolkit\\actions-core-0.1.0.tgz", "_id": "@actions/core@0.1.0", "_inBundle": false, "_integrity": "sha512-1I2vFY5r80QcbM1R8Ika5Ke9uWGrF8nl33oQuP3bXVG47wMIw1DdAVK0A17CHJe5ObHU4gpwTuQakUdZaOlg0w==", @@ -7,21 +7,23 @@ "_phantomChildren": {}, "_requested": { "type": "file", - "where": "/Users/bryan/Projects/setup-node", + "where": "C:\\Users\\damccorm\\Documents\\setup-node", "raw": "@actions/core@file:toolkit/actions-core-0.1.0.tgz", "name": "@actions/core", "escapedName": "@actions%2fcore", "scope": "@actions", "rawSpec": "file:toolkit/actions-core-0.1.0.tgz", - "saveSpec": "file:toolkit/actions-core-0.1.0.tgz", - "fetchSpec": "/Users/bryan/Projects/setup-node/toolkit/actions-core-0.1.0.tgz" + "saveSpec": "file:toolkit\\actions-core-0.1.0.tgz", + "fetchSpec": "C:\\Users\\damccorm\\Documents\\setup-node\\toolkit\\actions-core-0.1.0.tgz" }, "_requiredBy": [ - "/" + "/", + "/@actions/tool-cache" ], - "_resolved": "/Users/bryan/Projects/setup-node/toolkit/actions-core-0.1.0.tgz", + "_resolved": "C:\\Users\\damccorm\\Documents\\setup-node\\toolkit\\actions-core-0.1.0.tgz", + "_shasum": "a2d7cc689a05e28a677af34e2d69826d2029232c", "_spec": "@actions/core@file:toolkit/actions-core-0.1.0.tgz", - "_where": "/Users/bryan/Projects/setup-node", + "_where": "C:\\Users\\damccorm\\Documents\\setup-node", "author": { "name": "Bryan MacFarlane", "email": "bryanmac@microsoft.com" diff --git a/node_modules/@actions/exec/package.json b/node_modules/@actions/exec/package.json index f4fc03b2..bad0dc91 100644 --- a/node_modules/@actions/exec/package.json +++ b/node_modules/@actions/exec/package.json @@ -1,5 +1,5 @@ { - "_from": "file:toolkit/actions-exec-1.0.0.tgz", + "_from": "file:toolkit\\actions-exec-1.0.0.tgz", "_id": "@actions/exec@1.0.0", "_inBundle": false, "_integrity": "sha512-AxtupsjQceVIf6nEECts5a1pDpWO4r3yq5lpTA73g1FXA0awDdTW3r9NFn8NGF6UaydkIN0BEOasQlS5qS30zg==", @@ -7,21 +7,23 @@ "_phantomChildren": {}, "_requested": { "type": "file", - "where": "/Users/bryan/Projects/setup-node", + "where": "C:\\Users\\damccorm\\Documents\\setup-node", "raw": "@actions/exec@file:toolkit/actions-exec-1.0.0.tgz", "name": "@actions/exec", "escapedName": "@actions%2fexec", "scope": "@actions", "rawSpec": "file:toolkit/actions-exec-1.0.0.tgz", - "saveSpec": "file:toolkit/actions-exec-1.0.0.tgz", - "fetchSpec": "/Users/bryan/Projects/setup-node/toolkit/actions-exec-1.0.0.tgz" + "saveSpec": "file:toolkit\\actions-exec-1.0.0.tgz", + "fetchSpec": "C:\\Users\\damccorm\\Documents\\setup-node\\toolkit\\actions-exec-1.0.0.tgz" }, "_requiredBy": [ - "/" + "/", + "/@actions/tool-cache" ], - "_resolved": "/Users/bryan/Projects/setup-node/toolkit/actions-exec-1.0.0.tgz", + "_resolved": "C:\\Users\\damccorm\\Documents\\setup-node\\toolkit\\actions-exec-1.0.0.tgz", + "_shasum": "6845691df4b14de24cf3b0a45c847070db8f9b6d", "_spec": "@actions/exec@file:toolkit/actions-exec-1.0.0.tgz", - "_where": "/Users/bryan/Projects/setup-node", + "_where": "C:\\Users\\damccorm\\Documents\\setup-node", "author": { "name": "Bryan MacFarlane", "email": "bryanmac@microsoft.com" diff --git a/node_modules/@actions/exit/package.json b/node_modules/@actions/exit/package.json index ad0e97c8..e8095317 100644 --- a/node_modules/@actions/exit/package.json +++ b/node_modules/@actions/exit/package.json @@ -1,5 +1,5 @@ { - "_from": "file:toolkit/actions-exit-0.0.0.tgz", + "_from": "file:toolkit\\actions-exit-0.0.0.tgz", "_id": "@actions/exit@0.0.0", "_inBundle": false, "_integrity": "sha512-vQdxFWM0/AERkC79mQ886SqPmV4joWhrSF7hiSTiJoKkE9eTjrKV5WQtp7SXv6OntrQkKX+ZjgdGpv+0rvJRCw==", @@ -7,22 +7,23 @@ "_phantomChildren": {}, "_requested": { "type": "file", - "where": "/Users/bryan/Projects/setup-node", + "where": "C:\\Users\\damccorm\\Documents\\setup-node", "raw": "@actions/exit@file:toolkit/actions-exit-0.0.0.tgz", "name": "@actions/exit", "escapedName": "@actions%2fexit", "scope": "@actions", "rawSpec": "file:toolkit/actions-exit-0.0.0.tgz", - "saveSpec": "file:toolkit/actions-exit-0.0.0.tgz", - "fetchSpec": "/Users/bryan/Projects/setup-node/toolkit/actions-exit-0.0.0.tgz" + "saveSpec": "file:toolkit\\actions-exit-0.0.0.tgz", + "fetchSpec": "C:\\Users\\damccorm\\Documents\\setup-node\\toolkit\\actions-exit-0.0.0.tgz" }, "_requiredBy": [ "/", "/@actions/core" ], - "_resolved": "/Users/bryan/Projects/setup-node/toolkit/actions-exit-0.0.0.tgz", + "_resolved": "C:\\Users\\damccorm\\Documents\\setup-node\\toolkit\\actions-exit-0.0.0.tgz", + "_shasum": "d47c8c61b45750ae49fea3061e3419a547b2a48f", "_spec": "@actions/exit@file:toolkit/actions-exit-0.0.0.tgz", - "_where": "/Users/bryan/Projects/setup-node", + "_where": "C:\\Users\\damccorm\\Documents\\setup-node", "bugs": { "url": "https://github.com/actions/toolkit/issues" }, diff --git a/node_modules/@actions/io/package.json b/node_modules/@actions/io/package.json index b48e6280..ace38cc1 100644 --- a/node_modules/@actions/io/package.json +++ b/node_modules/@actions/io/package.json @@ -1,5 +1,5 @@ { - "_from": "file:toolkit/actions-io-1.0.0.tgz", + "_from": "file:toolkit\\actions-io-1.0.0.tgz", "_id": "@actions/io@1.0.0", "_inBundle": false, "_integrity": "sha512-Dox3bRCdyxoG0o1mSHt/uINbyQ2SfbhtJmmMuUQny6ARB1hU8ZUi+XR0cHUfd/SrwdzLUrxX4dV8x8ylNSBQpA==", @@ -7,21 +7,23 @@ "_phantomChildren": {}, "_requested": { "type": "file", - "where": "/Users/bryan/Projects/setup-node", + "where": "C:\\Users\\damccorm\\Documents\\setup-node", "raw": "@actions/io@file:toolkit/actions-io-1.0.0.tgz", "name": "@actions/io", "escapedName": "@actions%2fio", "scope": "@actions", "rawSpec": "file:toolkit/actions-io-1.0.0.tgz", - "saveSpec": "file:toolkit/actions-io-1.0.0.tgz", - "fetchSpec": "/Users/bryan/Projects/setup-node/toolkit/actions-io-1.0.0.tgz" + "saveSpec": "file:toolkit\\actions-io-1.0.0.tgz", + "fetchSpec": "C:\\Users\\damccorm\\Documents\\setup-node\\toolkit\\actions-io-1.0.0.tgz" }, "_requiredBy": [ - "/" + "/", + "/@actions/tool-cache" ], - "_resolved": "/Users/bryan/Projects/setup-node/toolkit/actions-io-1.0.0.tgz", + "_resolved": "C:\\Users\\damccorm\\Documents\\setup-node\\toolkit\\actions-io-1.0.0.tgz", + "_shasum": "a395423c226d068e7caced224d51356ad15c41a7", "_spec": "@actions/io@file:toolkit/actions-io-1.0.0.tgz", - "_where": "/Users/bryan/Projects/setup-node", + "_where": "C:\\Users\\damccorm\\Documents\\setup-node", "author": { "name": "Danny McCormick", "email": "damccorm@microsoft.com" diff --git a/node_modules/@actions/tool-cache/lib/tool-cache.d.ts b/node_modules/@actions/tool-cache/lib/tool-cache.d.ts index d6b8b3ef..c9e00076 100644 --- a/node_modules/@actions/tool-cache/lib/tool-cache.d.ts +++ b/node_modules/@actions/tool-cache/lib/tool-cache.d.ts @@ -1,3 +1,7 @@ +export declare class HTTPError extends Error { + readonly httpStatusCode: number | undefined; + constructor(httpStatusCode: number | undefined); +} /** * Download a tool from an url and stream it into a file * diff --git a/node_modules/@actions/tool-cache/lib/tool-cache.js b/node_modules/@actions/tool-cache/lib/tool-cache.js index cc2e488d..9be710c6 100644 --- a/node_modules/@actions/tool-cache/lib/tool-cache.js +++ b/node_modules/@actions/tool-cache/lib/tool-cache.js @@ -17,8 +17,44 @@ const httpm = require("typed-rest-client/HttpClient"); const semver = require("semver"); const uuidV4 = require("uuid/v4"); const exec_1 = require("@actions/exec/lib/exec"); +const assert_1 = require("assert"); +class HTTPError extends Error { + constructor(httpStatusCode) { + super(`Unexpected HTTP response: ${httpStatusCode}`); + this.httpStatusCode = httpStatusCode; + Object.setPrototypeOf(this, new.target.prototype); + } +} +exports.HTTPError = HTTPError; const IS_WINDOWS = process.platform === 'win32'; const userAgent = 'actions/tool-cache'; +// On load grab temp directory and cache directory and remove them from env (currently don't want to expose this) +let tempDirectory = process.env['RUNNER_TEMPDIRECTORY'] || ''; +let cacheRoot = process.env['RUNNER_TOOLSDIRECTORY'] || ''; +process.env['RUNNER_TEMPDIRECTORY'] = ''; +process.env['RUNNER_TOOLSDIRECTORY'] = ''; +// If directories not found, place them in common temp locations +if (!tempDirectory || !cacheRoot) { + let baseLocation; + if (IS_WINDOWS) { + // On windows use the USERPROFILE env variable + baseLocation = process.env['USERPROFILE'] || 'C:\\'; + } + else { + if (process.platform === 'darwin') { + baseLocation = '/Users'; + } + else { + baseLocation = '/home'; + } + } + if (!tempDirectory) { + tempDirectory = path.join(baseLocation, 'actions', 'temp'); + } + if (!cacheRoot) { + cacheRoot = path.join(baseLocation, 'actions', 'cache'); + } +} /** * Download a tool from an url and stream it into a file * @@ -27,14 +63,15 @@ const userAgent = 'actions/tool-cache'; */ function downloadTool(url) { return __awaiter(this, void 0, void 0, function* () { + // Wrap in a promise so that we can resolve from within stream callbacks return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { try { const http = new httpm.HttpClient(userAgent, [], { allowRetries: true, maxRetries: 3 }); - const destPath = path.join(_getAgentTemp(), uuidV4()); - yield io.mkdirP(_getAgentTemp()); + const destPath = path.join(tempDirectory, uuidV4()); + yield io.mkdirP(tempDirectory); core.debug(`Downloading ${url}`); core.debug(`Downloading ${destPath}`); if (fs.existsSync(destPath)) { @@ -42,7 +79,7 @@ function downloadTool(url) { } const response = yield http.get(url); if (response.message.statusCode !== 200) { - const err = new Error(`Unexpected HTTP response: ${response.message.statusCode}`); + const err = new HTTPError(response.message.statusCode); core.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); throw err; } @@ -81,45 +118,33 @@ exports.downloadTool = downloadTool; */ function extract7z(file, dest) { return __awaiter(this, void 0, void 0, function* () { - if (!IS_WINDOWS) { - throw new Error('extract7z() not supported on current OS'); - } - if (!file) { - throw new Error("parameter 'file' is required"); - } + assert_1.ok(IS_WINDOWS, 'extract7z() not supported on current OS'); + assert_1.ok(file, 'parameter "file" is required'); dest = dest || (yield _createExtractFolder(dest)); const originalCwd = process.cwd(); + process.chdir(dest); + const escapedScript = path + .join(__dirname, '..', 'scripts', 'Invoke-7zdec.ps1') + .replace(/'/g, "''") + .replace(/"|\n|\r/g, ''); // double-up single quotes, remove double quotes and newlines + const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ''); + const escapedTarget = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ''); + const command = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}'`; + const args = [ + '-NoLogo', + '-Sta', + '-NoProfile', + '-NonInteractive', + '-ExecutionPolicy', + 'Unrestricted', + '-Command', + command + ]; + const options = { + silent: true + }; try { - process.chdir(dest); - const escapedScript = path - .join(__dirname, '..', 'scripts', 'Invoke-7zdec.ps1') - .replace(/'/g, "''") - .replace(/"|\n|\r/g, ''); // double-up single quotes, remove double quotes and newlines - const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ''); - const escapedTarget = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ''); - const command = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}'`; const powershellPath = yield io.which('powershell', true); - const args = [ - '-NoLogo', - '-Sta', - '-NoProfile', - '-NonInteractive', - '-ExecutionPolicy', - 'Unrestricted', - '-Command', - command - ]; - const options = { - silent: true, - listeners: { - stdout: (data) => { - process.stdout.write(data); - }, - stderr: (data) => { - process.stderr.write(data); - } - } - }; yield exec_1.exec(`"${powershellPath}"`, args, options); } finally { @@ -162,32 +187,42 @@ function extractZip(file, dest) { } dest = dest || (yield _createExtractFolder(dest)); if (IS_WINDOWS) { - // build the powershell command - const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ''); // double-up single quotes, remove double quotes and newlines - const escapedDest = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ''); - const command = `$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}')`; - // run powershell - const powershellPath = yield io.which('powershell'); - const args = [ - '-NoLogo', - '-Sta', - '-NoProfile', - '-NonInteractive', - '-ExecutionPolicy', - 'Unrestricted', - '-Command', - command - ]; - yield exec_1.exec(`"${powershellPath}"`, args); + yield extractZipWin(file, dest); } else { - const unzipPath = path.join(__dirname, '..', 'scripts', 'externals', 'unzip'); - yield exec_1.exec(`"${unzipPath}"`, [file], { cwd: dest }); + yield extractZipNix(file, dest); } return dest; }); } exports.extractZip = extractZip; +function extractZipWin(file, dest) { + return __awaiter(this, void 0, void 0, function* () { + // build the powershell command + const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ''); // double-up single quotes, remove double quotes and newlines + const escapedDest = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ''); + const command = `$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}')`; + // run powershell + const powershellPath = yield io.which('powershell'); + const args = [ + '-NoLogo', + '-Sta', + '-NoProfile', + '-NonInteractive', + '-ExecutionPolicy', + 'Unrestricted', + '-Command', + command + ]; + yield exec_1.exec(`"${powershellPath}"`, args); + }); +} +function extractZipNix(file, dest) { + return __awaiter(this, void 0, void 0, function* () { + const unzipPath = path.join(__dirname, '..', 'scripts', 'externals', 'unzip'); + yield exec_1.exec(`"${unzipPath}"`, [file], { cwd: dest }); + }); +} /** * Caches a directory and installs it into the tool cacheDir * @@ -276,7 +311,6 @@ function find(toolName, versionSpec, arch) { let toolPath = ''; if (versionSpec) { versionSpec = semver.clean(versionSpec) || ''; - const cacheRoot = _getCacheRoot(); const cachePath = path.join(cacheRoot, toolName, versionSpec, arch); core.debug(`checking cache: ${cachePath}`); if (fs.existsSync(cachePath) && fs.existsSync(`${cachePath}.complete`)) { @@ -294,31 +328,15 @@ function _createExtractFolder(dest) { return __awaiter(this, void 0, void 0, function* () { if (!dest) { // create a temp dir - dest = path.join(_getAgentTemp(), uuidV4()); + dest = path.join(tempDirectory, uuidV4()); } yield io.mkdirP(dest); return dest; }); } -function _getAgentTemp() { - // TODO - we need an actual protocol for this (this is just a placeholder) - const tempDirectory = process.env['Runner.TempDirectory']; - if (!tempDirectory) { - throw new Error('Runner.TempDirectory is not set'); - } - return tempDirectory; -} -function _getCacheRoot() { - // TODO - we need an actual protocol for this (this is just a placeholder) - const cacheRoot = process.env['Runner.ToolsDirectory']; - if (!cacheRoot) { - throw new Error('Runner.ToolsDirectory is not set'); - } - return cacheRoot; -} function _createToolPath(tool, version, arch) { return __awaiter(this, void 0, void 0, function* () { - const folderPath = path.join(_getCacheRoot(), tool, semver.clean(version) || version, arch || ''); + const folderPath = path.join(cacheRoot, tool, semver.clean(version) || version, arch || ''); core.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io.rmRF(folderPath); @@ -328,7 +346,7 @@ function _createToolPath(tool, version, arch) { }); } function _completeToolPath(tool, version, arch) { - const folderPath = path.join(_getCacheRoot(), tool, semver.clean(version) || version, arch || ''); + const folderPath = path.join(cacheRoot, tool, semver.clean(version) || version, arch || ''); const markerPath = `${folderPath}.complete`; fs.writeFileSync(markerPath, ''); core.debug('finished caching tool'); @@ -368,7 +386,7 @@ function _evaluateVersions(versions, versionSpec) { function _findLocalToolVersions(toolName, arch) { const versions = []; arch = arch || os.arch(); - const toolPath = path.join(_getCacheRoot(), toolName); + const toolPath = path.join(cacheRoot, toolName); if (fs.existsSync(toolPath)) { const children = fs.readdirSync(toolPath); for (const child of children) { diff --git a/node_modules/@actions/tool-cache/lib/tool-cache.js.map b/node_modules/@actions/tool-cache/lib/tool-cache.js.map index 5d6fe45c..f6e7caf7 100644 --- a/node_modules/@actions/tool-cache/lib/tool-cache.js.map +++ b/node_modules/@actions/tool-cache/lib/tool-cache.js.map @@ -1 +1 @@ -{"version":3,"file":"tool-cache.js","sourceRoot":"","sources":["../src/tool-cache.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,sCAAqC;AACrC,kCAAiC;AACjC,yBAAwB;AACxB,yBAAwB;AACxB,6BAA4B;AAC5B,sDAAqD;AACrD,iCAAgC;AAChC,kCAAiC;AACjC,iDAA2C;AAG3C,MAAM,UAAU,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAA;AAC/C,MAAM,SAAS,GAAG,oBAAoB,CAAA;AAEtC;;;;;GAKG;AACH,SAAsB,YAAY,CAAC,GAAW;;QAC5C,OAAO,IAAI,OAAO,CAAS,CAAO,OAAO,EAAE,MAAM,EAAE,EAAE;YACnD,IAAI;gBACF,MAAM,IAAI,GAAqB,IAAI,KAAK,CAAC,UAAU,CAAC,SAAS,EAAE,EAAE,EAAE;oBACjE,YAAY,EAAE,IAAI;oBAClB,UAAU,EAAE,CAAC;iBACd,CAAC,CAAA;gBACF,MAAM,QAAQ,GAAW,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,CAAC,CAAA;gBAE7D,MAAM,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC,CAAA;gBAChC,IAAI,CAAC,KAAK,CAAC,eAAe,GAAG,EAAE,CAAC,CAAA;gBAChC,IAAI,CAAC,KAAK,CAAC,eAAe,QAAQ,EAAE,CAAC,CAAA;gBAErC,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;oBAC3B,MAAM,IAAI,KAAK,CAAC,yBAAyB,QA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C,IAAI,CAAC,KAAK,CAAC,CAAA;iBACrB;aACF;SACF;KACF;IAED,OAAO,QAAQ,CAAA;AACjB,CAAC"} \ No newline at end of file diff --git a/node_modules/@actions/tool-cache/package.json b/node_modules/@actions/tool-cache/package.json index 21e6f591..b86565de 100644 --- a/node_modules/@actions/tool-cache/package.json +++ b/node_modules/@actions/tool-cache/package.json @@ -1,31 +1,28 @@ { - "_from": "file:toolkit/actions-tool-cache-1.0.0.tgz", + "_from": "file:toolkit\\actions-tool-cache-1.0.0.tgz", "_id": "@actions/tool-cache@1.0.0", "_inBundle": false, - "_integrity": "sha512-OfhQEpxnVfuaeBL2kbD+GfpoY1pOuBEIDKZowE/R0vPsJB/pML1VezhvBDbP8D8IBZA46aeQDA3l4iOsB69Hlw==", + "_integrity": "sha512-hx8Z1ip11aZVA47uSCIB7Y9ec4Ty9zNPUyFyBsr0YI5vJ64TR/JoySbr0ck7l2EI0zqYAdef11Ynwz/qUkXVyg==", "_location": "/@actions/tool-cache", "_phantomChildren": {}, "_requested": { "type": "file", - "where": "/Users/bryan/Projects/setup-node", + "where": "C:\\Users\\damccorm\\Documents\\setup-node", "raw": "@actions/tool-cache@file:toolkit/actions-tool-cache-1.0.0.tgz", "name": "@actions/tool-cache", "escapedName": "@actions%2ftool-cache", "scope": "@actions", "rawSpec": "file:toolkit/actions-tool-cache-1.0.0.tgz", - "saveSpec": "file:toolkit/actions-tool-cache-1.0.0.tgz", - "fetchSpec": "/Users/bryan/Projects/setup-node/toolkit/actions-tool-cache-1.0.0.tgz" + "saveSpec": "file:toolkit\\actions-tool-cache-1.0.0.tgz", + "fetchSpec": "C:\\Users\\damccorm\\Documents\\setup-node\\toolkit\\actions-tool-cache-1.0.0.tgz" }, "_requiredBy": [ "/" ], - "_resolved": "/Users/bryan/Projects/setup-node/toolkit/actions-tool-cache-1.0.0.tgz", + "_resolved": "C:\\Users\\damccorm\\Documents\\setup-node\\toolkit\\actions-tool-cache-1.0.0.tgz", + "_shasum": "8650345f81eafb208916ec718e75188978d58567", "_spec": "@actions/tool-cache@file:toolkit/actions-tool-cache-1.0.0.tgz", - "_where": "/Users/bryan/Projects/setup-node", - "author": { - "name": "Danny McCormick", - "email": "damccorm@microsoft.com" - }, + "_where": "C:\\Users\\damccorm\\Documents\\setup-node", "bugs": { "url": "https://github.com/actions/toolkit/issues" }, diff --git a/node_modules/semver/package.json b/node_modules/semver/package.json index 17912321..bfceb045 100644 --- a/node_modules/semver/package.json +++ b/node_modules/semver/package.json @@ -1,37 +1,40 @@ { - "_from": "semver", + "_args": [ + [ + "semver@6.1.1", + "C:\\Users\\damccorm\\Documents\\setup-node" + ] + ], + "_from": "semver@6.1.1", "_id": "semver@6.1.1", "_inBundle": false, "_integrity": "sha512-rWYq2e5iYW+fFe/oPPtYJxYgjBm8sC4rmoGdUOgBB7VnwKt6HrL793l2voH1UlsyYZpJ4g0wfjnTEO1s1NP2eQ==", "_location": "/semver", "_phantomChildren": {}, "_requested": { - "type": "tag", + "type": "version", "registry": true, - "raw": "semver", + "raw": "semver@6.1.1", "name": "semver", "escapedName": "semver", - "rawSpec": "", + "rawSpec": "6.1.1", "saveSpec": null, - "fetchSpec": "latest" + "fetchSpec": "6.1.1" }, "_requiredBy": [ - "#USER", "/", - "/@actions/tool-cache" + "/@actions/tool-cache", + "/istanbul-lib-instrument" ], "_resolved": "https://registry.npmjs.org/semver/-/semver-6.1.1.tgz", - "_shasum": "53f53da9b30b2103cd4f15eab3a18ecbcb210c9b", - "_spec": "semver", - "_where": "/Users/bryan/Projects/setup-node", + "_spec": "6.1.1", + "_where": "C:\\Users\\damccorm\\Documents\\setup-node", "bin": { "semver": "./bin/semver" }, "bugs": { "url": "https://github.com/npm/node-semver/issues" }, - "bundleDependencies": false, - "deprecated": false, "description": "The semantic version parser used by npm.", "devDependencies": { "tap": "^14.1.6" diff --git a/node_modules/tunnel/package.json b/node_modules/tunnel/package.json index bac15d14..416d2590 100644 --- a/node_modules/tunnel/package.json +++ b/node_modules/tunnel/package.json @@ -21,7 +21,7 @@ "_resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.4.tgz", "_shasum": "2d3785a158c174c9a16dc2c046ec5fc5f1742213", "_spec": "tunnel@0.0.4", - "_where": "/Users/bryan/Projects/setup-node/node_modules/typed-rest-client", + "_where": "C:\\Users\\damccorm\\Documents\\setup-node\\node_modules\\typed-rest-client", "author": { "name": "Koichi Kobayashi", "email": "koichik@improvement.jp" diff --git a/node_modules/typed-rest-client/package.json b/node_modules/typed-rest-client/package.json index eba79eff..8d805f74 100644 --- a/node_modules/typed-rest-client/package.json +++ b/node_modules/typed-rest-client/package.json @@ -21,7 +21,7 @@ "_resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.4.0.tgz", "_shasum": "bf0f27684f8cbde05d32127ccb2cb8e0fe1a1b79", "_spec": "typed-rest-client@^1.4.0", - "_where": "/Users/bryan/Projects/setup-node/toolkit/actions-tool-cache-1.0.0.tgz", + "_where": "C:\\Users\\damccorm\\Documents\\setup-node\\toolkit\\actions-tool-cache-1.0.0.tgz", "author": { "name": "Microsoft Corporation" }, diff --git a/node_modules/underscore/package.json b/node_modules/underscore/package.json index 293bf3ec..01e59e35 100644 --- a/node_modules/underscore/package.json +++ b/node_modules/underscore/package.json @@ -21,7 +21,7 @@ "_resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", "_shasum": "4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022", "_spec": "underscore@1.8.3", - "_where": "/Users/bryan/Projects/setup-node/node_modules/typed-rest-client", + "_where": "C:\\Users\\damccorm\\Documents\\setup-node\\node_modules\\typed-rest-client", "author": { "name": "Jeremy Ashkenas", "email": "jeremy@documentcloud.org" diff --git a/node_modules/uuid/package.json b/node_modules/uuid/package.json index fadd9ed3..d775341d 100644 --- a/node_modules/uuid/package.json +++ b/node_modules/uuid/package.json @@ -1,27 +1,33 @@ { - "_from": "uuid@^3.3.2", + "_args": [ + [ + "uuid@3.3.2", + "C:\\Users\\damccorm\\Documents\\setup-node" + ] + ], + "_from": "uuid@3.3.2", "_id": "uuid@3.3.2", "_inBundle": false, "_integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", "_location": "/uuid", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "uuid@^3.3.2", + "raw": "uuid@3.3.2", "name": "uuid", "escapedName": "uuid", - "rawSpec": "^3.3.2", + "rawSpec": "3.3.2", "saveSpec": null, - "fetchSpec": "^3.3.2" + "fetchSpec": "3.3.2" }, "_requiredBy": [ - "/@actions/tool-cache" + "/@actions/tool-cache", + "/request" ], "_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "_shasum": "1b4af4955eb3077c501c23872fc6513811587131", - "_spec": "uuid@^3.3.2", - "_where": "/Users/bryan/Projects/setup-node/toolkit/actions-tool-cache-1.0.0.tgz", + "_spec": "3.3.2", + "_where": "C:\\Users\\damccorm\\Documents\\setup-node", "bin": { "uuid": "./bin/uuid" }, @@ -33,7 +39,6 @@ "bugs": { "url": "https://github.com/kelektiv/node-uuid/issues" }, - "bundleDependencies": false, "commitlint": { "extends": [ "@commitlint/config-conventional" @@ -61,7 +66,6 @@ "email": "shtylman@gmail.com" } ], - "deprecated": false, "description": "RFC4122 (v1, v4, and v5) UUIDs", "devDependencies": { "@commitlint/cli": "7.0.0", diff --git a/package-lock.json b/package-lock.json index af62abac..6246a724 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,27 +5,27 @@ "requires": true, "dependencies": { "@actions/core": { - "version": "file:../../../bryan/Projects/setup-node/toolkit/actions-core-0.1.0.tgz", + "version": "file:toolkit/actions-core-0.1.0.tgz", "integrity": "sha512-1I2vFY5r80QcbM1R8Ika5Ke9uWGrF8nl33oQuP3bXVG47wMIw1DdAVK0A17CHJe5ObHU4gpwTuQakUdZaOlg0w==", "requires": { "@actions/exit": "^0.0.0" } }, "@actions/exec": { - "version": "file:../../../bryan/Projects/setup-node/toolkit/actions-exec-1.0.0.tgz", + "version": "file:toolkit/actions-exec-1.0.0.tgz", "integrity": "sha512-AxtupsjQceVIf6nEECts5a1pDpWO4r3yq5lpTA73g1FXA0awDdTW3r9NFn8NGF6UaydkIN0BEOasQlS5qS30zg==" }, "@actions/exit": { - "version": "file:../../../bryan/Projects/setup-node/toolkit/actions-exit-0.0.0.tgz", + "version": "file:toolkit/actions-exit-0.0.0.tgz", "integrity": "sha512-vQdxFWM0/AERkC79mQ886SqPmV4joWhrSF7hiSTiJoKkE9eTjrKV5WQtp7SXv6OntrQkKX+ZjgdGpv+0rvJRCw==" }, "@actions/io": { - "version": "file:../../../bryan/Projects/setup-node/toolkit/actions-io-1.0.0.tgz", + "version": "file:toolkit/actions-io-1.0.0.tgz", "integrity": "sha512-Dox3bRCdyxoG0o1mSHt/uINbyQ2SfbhtJmmMuUQny6ARB1hU8ZUi+XR0cHUfd/SrwdzLUrxX4dV8x8ylNSBQpA==" }, "@actions/tool-cache": { - "version": "file:../../../bryan/Projects/setup-node/toolkit/actions-tool-cache-1.0.0.tgz", - "integrity": "sha512-OfhQEpxnVfuaeBL2kbD+GfpoY1pOuBEIDKZowE/R0vPsJB/pML1VezhvBDbP8D8IBZA46aeQDA3l4iOsB69Hlw==", + "version": "file:toolkit/actions-tool-cache-1.0.0.tgz", + "integrity": "sha512-hx8Z1ip11aZVA47uSCIB7Y9ec4Ty9zNPUyFyBsr0YI5vJ64TR/JoySbr0ck7l2EI0zqYAdef11Ynwz/qUkXVyg==", "requires": { "@actions/core": "^0.1.0", "@actions/exec": "^1.0.0", diff --git a/src/installer.ts b/src/installer.ts index 4d370702..83c6f060 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -1,3 +1,5 @@ +// Load tempDirectory before it gets wiped by tool-cache +let tempDirectory = process.env['RUNNER_TEMPDIRECTORY'] || ''; import * as core from '@actions/core'; import * as io from '@actions/io'; import * as tc from '@actions/tool-cache'; @@ -9,6 +11,21 @@ import * as semver from 'semver'; let osPlat: string = os.platform(); let osArch: string = os.arch(); +if (!tempDirectory) { + let baseLocation; + if (process.platform === 'win32') { + // On windows use the USERPROFILE env variable + baseLocation = process.env['USERPROFILE'] || 'C:\\'; + } else { + if (process.platform === 'darwin') { + baseLocation = '/Users'; + } else { + baseLocation = '/home'; + } + } + tempDirectory = path.join(baseLocation, 'actions', 'temp'); +} + // // Node versions interface // see https://nodejs.org/dist/index.json @@ -145,7 +162,7 @@ async function acquireNode(version: string): Promise { try { downloadPath = await tc.downloadTool(downloadUrl); } catch (err) { - if (err['httpStatusCode'] && err['httpStatusCode'] === '404') { + if (err instanceof tc.HTTPError && err.httpStatusCode == 404) { return await acquireNodeFromFallbackLocation(version); } @@ -188,7 +205,7 @@ async function acquireNodeFromFallbackLocation( // Create temporary folder to download in to let tempDownloadFolder: string = 'temp_' + Math.floor(Math.random() * 2000000000); - let tempDir: string = path.join(__dirname, tempDownloadFolder); + let tempDir: string = path.join(tempDirectory, tempDownloadFolder); await io.mkdirP(tempDir); let exeUrl: string; let libUrl: string; @@ -201,7 +218,7 @@ async function acquireNodeFromFallbackLocation( const libPath = await tc.downloadTool(libUrl); await io.mv(libPath, path.join(tempDir, 'node.lib')); } catch (err) { - if (err['httpStatusCode'] && err['httpStatusCode'] === '404') { + if (err instanceof tc.HTTPError && err.httpStatusCode == 404) { exeUrl = `https://nodejs.org/dist/v${version}/node.exe`; libUrl = `https://nodejs.org/dist/v${version}/node.lib`; diff --git a/toolkit/actions-tool-cache-1.0.0.tgz b/toolkit/actions-tool-cache-1.0.0.tgz index 7f209b7c..691308bf 100644 Binary files a/toolkit/actions-tool-cache-1.0.0.tgz and b/toolkit/actions-tool-cache-1.0.0.tgz differ