Skip to content

Commit 3250b53

Browse files
author
Sergey Dolin
authored
Force RUNNER_TOOL_CACHE to be equal AGENT_TOOLSDIRECTORY
1 parent 7f80679 commit 3250b53

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

dist/setup/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6645,6 +6645,13 @@ function cacheDependencies(cache, pythonVersion) {
66456645
}
66466646
function run() {
66476647
return __awaiter(this, void 0, void 0, function* () {
6648+
if (process.env['AGENT_TOOLSDIRECTORY'] !== undefined) {
6649+
core.debug('Python is expected to be installed into AGENT_TOOLSDIRECTORY=' + process.env['AGENT_TOOLSDIRECTORY']);
6650+
process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
6651+
}
6652+
else {
6653+
core.debug('Python is expected to be installed into RUNNER_TOOL_CACHE=' + process.env['RUNNER_TOOL_CACHE']);
6654+
}
66486655
try {
66496656
const version = core.getInput('python-version');
66506657
if (version) {

src/setup-python.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ async function cacheDependencies(cache: string, pythonVersion: string) {
2525
}
2626

2727
async function run() {
28+
29+
if (process.env['AGENT_TOOLSDIRECTORY'] !== undefined) {
30+
core.debug('Python is expected to be installed into AGENT_TOOLSDIRECTORY=' + process.env['AGENT_TOOLSDIRECTORY'] )
31+
process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY']
32+
} else {
33+
core.debug('Python is expected to be installed into RUNNER_TOOL_CACHE=' + process.env['RUNNER_TOOL_CACHE'] )
34+
}
2835
try {
2936
const version = core.getInput('python-version');
3037
if (version) {

0 commit comments

Comments
 (0)