File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
Filter options
Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
Original file line number Diff line number Diff line change @@ -6083,7 +6083,15 @@ function cacheDependencies(cache, pythonVersion) {
6083
6083
});
6084
6084
}
6085
6085
function run() {
6086
+ var _a;
6086
6087
return __awaiter(this, void 0, void 0, function* () {
6088
+ if ((_a = process.env.AGENT_TOOLSDIRECTORY) === null || _a === void 0 ? void 0 : _a.trim()) {
6089
+ core.debug(`Python is expected to be installed into AGENT_TOOLSDIRECTORY=${process.env['AGENT_TOOLSDIRECTORY']}`);
6090
+ process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
6091
+ }
6092
+ else {
6093
+ core.debug(`Python is expected to be installed into RUNNER_TOOL_CACHE==${process.env['RUNNER_TOOL_CACHE']}`);
6094
+ }
6087
6095
try {
6088
6096
const version = core.getInput('python-version');
6089
6097
if (version) {
Original file line number Diff line number Diff line change @@ -22,6 +22,16 @@ async function cacheDependencies(cache: string, pythonVersion: string) {
22
22
}
23
23
24
24
async function run ( ) {
25
+ if ( process . env . AGENT_TOOLSDIRECTORY ?. trim ( ) ) {
26
+ core . debug (
27
+ `Python is expected to be installed into AGENT_TOOLSDIRECTORY=${ process . env [ 'AGENT_TOOLSDIRECTORY' ] } `
28
+ ) ;
29
+ process . env [ 'RUNNER_TOOL_CACHE' ] = process . env [ 'AGENT_TOOLSDIRECTORY' ] ;
30
+ } else {
31
+ core . debug (
32
+ `Python is expected to be installed into RUNNER_TOOL_CACHE==${ process . env [ 'RUNNER_TOOL_CACHE' ] } `
33
+ ) ;
34
+ }
25
35
try {
26
36
const version = core . getInput ( 'python-version' ) ;
27
37
if ( version ) {
You can’t perform that action at this time.
0 commit comments