Merge pull request #338 from akv-demo/main

Force TOOLCACHE_ROOT to be equal AGENT_TOOLSDIRECTORY
This commit is contained in:
Marko Zivic 2022-04-15 09:54:33 +02:00 committed by GitHub
commit 91712e11bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

8
dist/setup/index.js vendored
View File

@ -6083,7 +6083,15 @@ function cacheDependencies(cache, pythonVersion) {
});
}
function run() {
var _a;
return __awaiter(this, void 0, void 0, function* () {
if ((_a = process.env.AGENT_TOOLSDIRECTORY) === null || _a === void 0 ? void 0 : _a.trim()) {
core.debug(`Python is expected to be installed into AGENT_TOOLSDIRECTORY=${process.env['AGENT_TOOLSDIRECTORY']}`);
process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
}
else {
core.debug(`Python is expected to be installed into RUNNER_TOOL_CACHE==${process.env['RUNNER_TOOL_CACHE']}`);
}
try {
const version = core.getInput('python-version');
if (version) {

View File

@ -22,6 +22,16 @@ async function cacheDependencies(cache: string, pythonVersion: string) {
}
async function run() {
if (process.env.AGENT_TOOLSDIRECTORY?.trim()) {
core.debug(
`Python is expected to be installed into AGENT_TOOLSDIRECTORY=${process.env['AGENT_TOOLSDIRECTORY']}`
);
process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
} else {
core.debug(
`Python is expected to be installed into RUNNER_TOOL_CACHE==${process.env['RUNNER_TOOL_CACHE']}`
);
}
try {
const version = core.getInput('python-version');
if (version) {