Skip to content

Commit 9588973

Browse files
committed
Exclude windows from the fix
1 parent 5d9fdca commit 9588973

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

dist/setup/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5325,14 +5325,16 @@ function cacheDependencies(cache, pythonVersion) {
53255325
function run() {
53265326
var _a;
53275327
return __awaiter(this, void 0, void 0, function* () {
5328+
// According to the README windows binaries do not require to be installed
5329+
// in the specific location, but Mac and Linux do
53285330
if (!utils_1.IS_WINDOWS && !((_a = process.env.AGENT_TOOLSDIRECTORY) === null || _a === void 0 ? void 0 : _a.trim())) {
53295331
if (utils_1.IS_LINUX)
53305332
process.env['AGENT_TOOLSDIRECTORY'] = '/opt/hostedtoolcache';
53315333
else
53325334
process.env['AGENT_TOOLSDIRECTORY'] = '/Users/runner/hostedtoolcache';
5335+
process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
53335336
}
5334-
core.debug(`Python is expected to be installed into AGENT_TOOLSDIRECTORY=${process.env['AGENT_TOOLSDIRECTORY']}`);
5335-
process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
5337+
core.debug(`Python is expected to be installed into RUNNER_TOOL_CACHE=${process.env['RUNNER_TOOL_CACHE']}`);
53365338
try {
53375339
const version = core.getInput('python-version');
53385340
if (version) {

src/setup-python.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,16 @@ function resolveVersionInput(): string {
4949
}
5050

5151
async function run() {
52+
// According to the README windows binaries do not require to be installed
53+
// in the specific location, but Mac and Linux do
5254
if (!IS_WINDOWS && !process.env.AGENT_TOOLSDIRECTORY?.trim()) {
5355
if (IS_LINUX) process.env['AGENT_TOOLSDIRECTORY'] = '/opt/hostedtoolcache';
5456
else process.env['AGENT_TOOLSDIRECTORY'] = '/Users/runner/hostedtoolcache';
57+
process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
5558
}
5659
core.debug(
57-
`Python is expected to be installed into AGENT_TOOLSDIRECTORY=${process.env['AGENT_TOOLSDIRECTORY']}`
60+
`Python is expected to be installed into RUNNER_TOOL_CACHE=${process.env['RUNNER_TOOL_CACHE']}`
5861
);
59-
process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
6062
try {
6163
const version = resolveVersionInput();
6264
if (version) {

0 commit comments

Comments
 (0)