mirror of
https://github.com/actions/setup-python.git
synced 2024-12-22 20:32:31 +00:00
Merge pull request #338 from akv-demo/main
Force TOOLCACHE_ROOT to be equal AGENT_TOOLSDIRECTORY
This commit is contained in:
commit
91712e11bb
2 changed files with 18 additions and 0 deletions
8
dist/setup/index.js
vendored
8
dist/setup/index.js
vendored
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue