File tree Expand file tree Collapse file tree 2 files changed +7
-15
lines changed Expand file tree Collapse file tree 2 files changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -65340,13 +65340,9 @@ function resolveVersionInput() {
6534065340function run() {
6534165341 var _a;
6534265342 return __awaiter(this, void 0, void 0, function* () {
65343- // According to the README windows binaries do not require to be installed
65344- // in the specific location, but Mac and Linux do
65345- if (!utils_1.IS_WINDOWS && !((_a = process.env.AGENT_TOOLSDIRECTORY) === null || _a === void 0 ? void 0 : _a.trim())) {
65346- if (utils_1.IS_LINUX)
65347- process.env['AGENT_TOOLSDIRECTORY'] = '/opt/hostedtoolcache';
65348- else
65349- process.env['AGENT_TOOLSDIRECTORY'] = '/Users/runner/hostedtoolcache';
65343+ // When setting AGENT_TOOLSDIRECTORY, the actions/tool-cache function find
65344+ // is not able to find the files cached by actions/python-version.
65345+ if ((_a = process.env.AGENT_TOOLSDIRECTORY) === null || _a === void 0 ? void 0 : _a.trim()) {
6535065346 process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
6535165347 }
6535265348 core.debug(`Python is expected to be installed into RUNNER_TOOL_CACHE=${process.env['RUNNER_TOOL_CACHE']}`);
Original file line number Diff line number Diff line change @@ -7,9 +7,7 @@ import fs from 'fs';
77import { getCacheDistributor } from './cache-distributions/cache-factory' ;
88import {
99 isCacheFeatureAvailable ,
10- logWarning ,
11- IS_LINUX ,
12- IS_WINDOWS
10+ logWarning
1311} from './utils' ;
1412
1513function isPyPyVersion ( versionSpec : string ) {
@@ -68,11 +66,9 @@ function resolveVersionInput(): string {
6866}
6967
7068async function run ( ) {
71- // According to the README windows binaries do not require to be installed
72- // in the specific location, but Mac and Linux do
73- if ( ! IS_WINDOWS && ! process . env . AGENT_TOOLSDIRECTORY ?. trim ( ) ) {
74- if ( IS_LINUX ) process . env [ 'AGENT_TOOLSDIRECTORY' ] = '/opt/hostedtoolcache' ;
75- else process . env [ 'AGENT_TOOLSDIRECTORY' ] = '/Users/runner/hostedtoolcache' ;
69+ // When setting AGENT_TOOLSDIRECTORY, the actions/tool-cache function find
70+ // is not able to find the files cached by actions/python-version.
71+ if ( process . env . AGENT_TOOLSDIRECTORY ?. trim ( ) ) {
7672 process . env [ 'RUNNER_TOOL_CACHE' ] = process . env [ 'AGENT_TOOLSDIRECTORY' ] ;
7773 }
7874 core . debug (
You can’t perform that action at this time.
0 commit comments