Skip to content

Commit

Permalink
Merge pull request #338 from akv-demo/main
Browse files Browse the repository at this point in the history
Force TOOLCACHE_ROOT to be equal AGENT_TOOLSDIRECTORY
  • Loading branch information
marko-zivic-93 committed Apr 15, 2022
2 parents 98f2ad0 + f4b66de commit 91712e1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dist/setup/index.js
Expand Up @@ -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) {
Expand Down
10 changes: 10 additions & 0 deletions src/setup-python.ts
Expand Up @@ -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) {
Expand Down

0 comments on commit 91712e1

Please sign in to comment.