1
0
Fork 0
mirror of https://github.com/actions/setup-node synced 2025-04-09 18:35:51 +00:00
This commit is contained in:
Thang Le 2025-04-02 16:06:40 -04:00 committed by GitHub
commit 999911c491
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions
dist/setup
src

5
dist/setup/index.js vendored
View file

@ -97886,6 +97886,7 @@ const util_1 = __nccwpck_require__(4527);
const constants_1 = __nccwpck_require__(7242);
function run() {
return __awaiter(this, void 0, void 0, function* () {
var _a;
try {
//
// Version is optional. If supplied, install / use from the tool cache
@ -97902,6 +97903,10 @@ function run() {
if (!arch) {
arch = os_1.default.arch();
}
if ((_a = process.env.AGENT_TOOLSDIRECTORY) === null || _a === void 0 ? void 0 : _a.trim()) {
process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
}
core.debug(`Node is expected to be installed into ${process.env['RUNNER_TOOL_CACHE']}`);
if (version) {
const token = core.getInput('token');
const auth = !token ? undefined : `token ${token}`;

View file

@ -33,6 +33,14 @@ export async function run() {
arch = os.arch();
}
if (process.env.AGENT_TOOLSDIRECTORY?.trim()) {
process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
}
core.debug(
`Node is expected to be installed into ${process.env['RUNNER_TOOL_CACHE']}`
);
if (version) {
const token = core.getInput('token');
const auth = !token ? undefined : `token ${token}`;