diff --git a/dist/setup/index.js b/dist/setup/index.js index 5a4048b15..316e77225 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -65288,14 +65288,17 @@ function resolveVersionInput() { return version; } function run() { - var _a; + var _a, _b; return __awaiter(this, void 0, void 0, function* () { - // When setting AGENT_TOOLSDIRECTORY, the actions/tool-cache function find - // is not able to find the files cached by actions/python-version. + if (utils_1.IS_MAC) { + process.env['AGENT_TOOLSDIRECTORY'] = '/Users/runner/hostedtoolcache'; + } 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(`Python is expected to be installed into RUNNER_TOOL_CACHE=${process.env['RUNNER_TOOL_CACHE']}`); + core.debug(`Python is expected to be installed into ${((_b = process.env.AGENT_TOOLSDIRECTORY) === null || _b === void 0 ? void 0 : _b.trim()) + ? process.env['AGENT_TOOLSDIRECTORY'] + : process.env['RUNNER_TOOL_CACHE']}`); try { const version = resolveVersionInput(); if (version) { @@ -65375,7 +65378,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getLinuxOSReleaseInfo = exports.isCacheFeatureAvailable = exports.isGhes = exports.validatePythonVersionFormatForPyPy = exports.writeExactPyPyVersionFile = exports.readExactPyPyVersionFile = exports.getPyPyVersionFromPath = exports.isNightlyKeyword = exports.validateVersion = exports.createSymlinkInFolder = exports.WINDOWS_PLATFORMS = exports.WINDOWS_ARCHS = exports.IS_LINUX = exports.IS_WINDOWS = void 0; +exports.getLinuxOSReleaseInfo = exports.isCacheFeatureAvailable = exports.isGhes = exports.validatePythonVersionFormatForPyPy = exports.writeExactPyPyVersionFile = exports.readExactPyPyVersionFile = exports.getPyPyVersionFromPath = exports.isNightlyKeyword = exports.validateVersion = exports.createSymlinkInFolder = exports.WINDOWS_PLATFORMS = exports.WINDOWS_ARCHS = exports.IS_MAC = exports.IS_LINUX = exports.IS_WINDOWS = void 0; const cache = __importStar(__nccwpck_require__(7799)); const core = __importStar(__nccwpck_require__(2186)); const fs_1 = __importDefault(__nccwpck_require__(7147)); @@ -65711,4 +65714,4 @@ module.exports = JSON.parse('["ac","com.ac","edu.ac","gov.ac","net.ac","mil.ac", /******/ module.exports = __webpack_exports__; /******/ /******/ })() -; +; \ No newline at end of file diff --git a/src/setup-python.ts b/src/setup-python.ts index 6ffbfc635..3f5f1c28a 100644 --- a/src/setup-python.ts +++ b/src/setup-python.ts @@ -63,13 +63,20 @@ function resolveVersionInput(): string { } async function run() { - // When setting AGENT_TOOLSDIRECTORY, the actions/tool-cache function find - // is not able to find the files cached by actions/python-version. - if (process.env.AGENT_TOOLSDIRECTORY?.trim()) { + if (IS_MAC) { + process.env['AGENT_TOOLSDIRECTORY'] = '/Users/runner/hostedtoolcache'; + } + + if (process.env.AGENT_TOOLSDIRECTORY?.trim()){ process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY']; } + core.debug( - `Python is expected to be installed into RUNNER_TOOL_CACHE=${process.env['RUNNER_TOOL_CACHE']}` + `Python is expected to be installed into ${ + process.env.AGENT_TOOLSDIRECTORY?.trim() + ? process.env['AGENT_TOOLSDIRECTORY'] + : process.env['RUNNER_TOOL_CACHE'] + }` ); try { const version = resolveVersionInput();