Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 91712e1

Browse filesBrowse files
Merge pull request actions#338 from akv-demo/main
Force TOOLCACHE_ROOT to be equal AGENT_TOOLSDIRECTORY
2 parents 98f2ad0 + f4b66de commit 91712e1
Copy full SHA for 91712e1

File tree

Expand file treeCollapse file tree

2 files changed

+18
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+18
-0
lines changed

‎dist/setup/index.js

Copy file name to clipboardExpand all lines: dist/setup/index.js
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6083,7 +6083,15 @@ function cacheDependencies(cache, pythonVersion) {
60836083
});
60846084
}
60856085
function run() {
6086+
var _a;
60866087
return __awaiter(this, void 0, void 0, function* () {
6088+
if ((_a = process.env.AGENT_TOOLSDIRECTORY) === null || _a === void 0 ? void 0 : _a.trim()) {
6089+
core.debug(`Python is expected to be installed into AGENT_TOOLSDIRECTORY=${process.env['AGENT_TOOLSDIRECTORY']}`);
6090+
process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
6091+
}
6092+
else {
6093+
core.debug(`Python is expected to be installed into RUNNER_TOOL_CACHE==${process.env['RUNNER_TOOL_CACHE']}`);
6094+
}
60876095
try {
60886096
const version = core.getInput('python-version');
60896097
if (version) {

‎src/setup-python.ts

Copy file name to clipboardExpand all lines: src/setup-python.ts
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@ async function cacheDependencies(cache: string, pythonVersion: string) {
2222
}
2323

2424
async function run() {
25+
if (process.env.AGENT_TOOLSDIRECTORY?.trim()) {
26+
core.debug(
27+
`Python is expected to be installed into AGENT_TOOLSDIRECTORY=${process.env['AGENT_TOOLSDIRECTORY']}`
28+
);
29+
process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
30+
} else {
31+
core.debug(
32+
`Python is expected to be installed into RUNNER_TOOL_CACHE==${process.env['RUNNER_TOOL_CACHE']}`
33+
);
34+
}
2535
try {
2636
const version = core.getInput('python-version');
2737
if (version) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.