diff --git a/dist/setup/index.js b/dist/setup/index.js index e56f9660..a8ea39e1 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -91842,7 +91842,7 @@ function run() { return __awaiter(this, void 0, void 0, function* () { var _a; 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 0dd45f0c..3203e29d 100644 --- a/src/setup-python.ts +++ b/src/setup-python.ts @@ -78,7 +78,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()) {