mirror of
https://github.com/actions/setup-python.git
synced 2024-11-09 21:31:06 +07:00
Merge pull request #338 from akv-demo/main
Force TOOLCACHE_ROOT to be equal AGENT_TOOLSDIRECTORY
This commit is contained in:
commit
91712e11bb
8
dist/setup/index.js
vendored
8
dist/setup/index.js
vendored
@ -6083,7 +6083,15 @@ function cacheDependencies(cache, pythonVersion) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function run() {
|
function run() {
|
||||||
|
var _a;
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
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 {
|
try {
|
||||||
const version = core.getInput('python-version');
|
const version = core.getInput('python-version');
|
||||||
if (version) {
|
if (version) {
|
||||||
|
@ -22,6 +22,16 @@ async function cacheDependencies(cache: string, pythonVersion: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function run() {
|
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 {
|
try {
|
||||||
const version = core.getInput('python-version');
|
const version = core.getInput('python-version');
|
||||||
if (version) {
|
if (version) {
|
||||||
|
Loading…
Reference in New Issue
Block a user