mirror of
https://github.com/actions/setup-node.git
synced 2025-07-22 16:16:09 +08:00
publishing v1 of action
This commit is contained in:
8
node_modules/@actions/tool-cache/lib/tool-cache.js
generated
vendored
8
node_modules/@actions/tool-cache/lib/tool-cache.js
generated
vendored
@@ -30,8 +30,8 @@ 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_TEMP'] || '';
|
||||
let cacheRoot = process.env['RUNNER_TOOL_CACHE'] || '';
|
||||
let tempDirectory = process.env['RUNNER_TEMPDIRECTORY'] || '';
|
||||
let cacheRoot = process.env['RUNNER_TOOLSDIRECTORY'] || '';
|
||||
// If directories not found, place them in common temp locations
|
||||
if (!tempDirectory || !cacheRoot) {
|
||||
let baseLocation;
|
||||
@@ -273,7 +273,7 @@ function cacheDir(sourceDir, tool, version, arch) {
|
||||
// due to anti-virus software having an open handle on a file.
|
||||
for (const itemName of fs.readdirSync(sourceDir)) {
|
||||
const s = path.join(sourceDir, itemName);
|
||||
shell.cp('-R', s, destPath);
|
||||
shell.cp(s, destPath, '-r');
|
||||
}
|
||||
// write .complete
|
||||
_completeToolPath(tool, version, arch);
|
||||
@@ -434,4 +434,4 @@ function _evaluateVersions(versions, versionSpec) {
|
||||
}
|
||||
return version;
|
||||
}
|
||||
//# sourceMappingURL=tool-cache.js.map
|
||||
//# sourceMappingURL=tool-cache.js.map
|
Reference in New Issue
Block a user