File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65278,14 +65278,11 @@ function resolveVersionInput() {
6527865278function run() {
6527965279 var _a;
6528065280 return __awaiter(this, void 0, void 0, function* () {
65281- // According to the README windows binaries do not require to be installed
65282- // in the specific location, but Mac and Linux do
65283- if (!utils_1.IS_WINDOWS && !((_a = process.env.AGENT_TOOLSDIRECTORY) === null || _a === void 0 ? void 0 : _a.trim())) {
65284- if (utils_1.IS_LINUX)
65285- process.env['AGENT_TOOLSDIRECTORY'] = '/opt/hostedtoolcache';
65286- else
65287- process.env['AGENT_TOOLSDIRECTORY'] = '/Users/runner/hostedtoolcache';
65288- process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
65281+ // This aligns us with actions/setup-python, which defaults their
65282+ // internal TOOLCACHE_ROOT to RUNNER_TOOL_CACHE when AGENT_TOOLSDIRECTORY
65283+ // is not set.
65284+ if (!((_a = process.env.AGENT_TOOLSDIRECTORY) === null || _a === void 0 ? void 0 : _a.trim())) {
65285+ process.env['AGENT_TOOLSDIRECTORY'] = process.env['RUNNER_TOOL_CACHE'];
6528965286 }
6529065287 core.debug(`Python is expected to be installed into RUNNER_TOOL_CACHE=${process.env['RUNNER_TOOL_CACHE']}`);
6529165288 try {
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import * as path from 'path';
55import * as os from 'os' ;
66import fs from 'fs' ;
77import { getCacheDistributor } from './cache-distributions/cache-factory' ;
8- import { isCacheFeatureAvailable , IS_LINUX , IS_WINDOWS } from './utils' ;
8+ import { isCacheFeatureAvailable } from './utils' ;
99
1010function isPyPyVersion ( versionSpec : string ) {
1111 return versionSpec . startsWith ( 'pypy' ) ;
@@ -61,12 +61,11 @@ function resolveVersionInput(): string {
6161}
6262
6363async function run ( ) {
64- // According to the README windows binaries do not require to be installed
65- // in the specific location, but Mac and Linux do
66- if ( ! IS_WINDOWS && ! process . env . AGENT_TOOLSDIRECTORY ?. trim ( ) ) {
67- if ( IS_LINUX ) process . env [ 'AGENT_TOOLSDIRECTORY' ] = '/opt/hostedtoolcache' ;
68- else process . env [ 'AGENT_TOOLSDIRECTORY' ] = '/Users/runner/hostedtoolcache' ;
69- process . env [ 'RUNNER_TOOL_CACHE' ] = process . env [ 'AGENT_TOOLSDIRECTORY' ] ;
64+ // This aligns us with actions/setup-python, which defaults their
65+ // internal TOOLCACHE_ROOT to RUNNER_TOOL_CACHE when AGENT_TOOLSDIRECTORY
66+ // is not set.
67+ if ( ! process . env . AGENT_TOOLSDIRECTORY ?. trim ( ) ) {
68+ process . env [ 'AGENT_TOOLSDIRECTORY' ] = process . env [ 'RUNNER_TOOL_CACHE' ] ;
7069 }
7170 core . debug (
7271 `Python is expected to be installed into RUNNER_TOOL_CACHE=${ process . env [ 'RUNNER_TOOL_CACHE' ] } `
You can’t perform that action at this time.
0 commit comments