mirror of
https://github.com/actions/setup-python.git
synced 2024-11-10 05:41:06 +07:00
Force RUNNER_TOOL_CACHE to be equal AGENT_TOOLSDIRECTORY
This commit is contained in:
parent
7f80679172
commit
3250b5373c
7
dist/setup/index.js
vendored
7
dist/setup/index.js
vendored
@ -6645,6 +6645,13 @@ function cacheDependencies(cache, pythonVersion) {
|
|||||||
}
|
}
|
||||||
function run() {
|
function run() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
if (process.env['AGENT_TOOLSDIRECTORY'] !== undefined) {
|
||||||
|
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) {
|
||||||
|
@ -25,6 +25,13 @@ async function cacheDependencies(cache: string, pythonVersion: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
|
|
||||||
|
if (process.env['AGENT_TOOLSDIRECTORY'] !== undefined) {
|
||||||
|
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