diff --git a/dist/setup/index.js b/dist/setup/index.js index 37b247905..4a642940e 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -69859,7 +69859,7 @@ function run() { var _a; return __awaiter(this, void 0, void 0, function* () { if (utils_1.IS_MAC) { - process.env['AGENT_TOOLSDIRECTORY'] = '/Users/runner/hostedtoolcache'; + process.env['AGENT_TOOLSDIRECTORY'] = path.join(os.homedir(), 'hostedtoolcache'); } if ((_a = process.env.AGENT_TOOLSDIRECTORY) === null || _a === void 0 ? void 0 : _a.trim()) { process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY']; diff --git a/src/setup-python.ts b/src/setup-python.ts index 88ffc1056..46aedde45 100644 --- a/src/setup-python.ts +++ b/src/setup-python.ts @@ -73,7 +73,10 @@ function resolveVersionInput() { async function run() { if (IS_MAC) { - process.env['AGENT_TOOLSDIRECTORY'] = '/Users/runner/hostedtoolcache'; + process.env['AGENT_TOOLSDIRECTORY'] = path.join( + os.homedir(), + 'hostedtoolcache' + ); } if (process.env.AGENT_TOOLSDIRECTORY?.trim()) {