File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -5325,8 +5325,11 @@ function cacheDependencies(cache, pythonVersion) {
53255325function run() {
53265326 var _a;
53275327 return __awaiter(this, void 0, void 0, function* () {
5328- if (!((_a = process.env.AGENT_TOOLSDIRECTORY) === null || _a === void 0 ? void 0 : _a.trim())) {
5329- process.env['AGENT_TOOLSDIRECTORY'] = '/opt/hostedtoolcache';
5328+ if (!utils_1.IS_WINDOWS && !((_a = process.env.AGENT_TOOLSDIRECTORY) === null || _a === void 0 ? void 0 : _a.trim())) {
5329+ if (utils_1.IS_LINUX)
5330+ process.env['AGENT_TOOLSDIRECTORY'] = '/opt/hostedtoolcache';
5331+ else
5332+ process.env['AGENT_TOOLSDIRECTORY'] = '/Users/runner/hostedtoolcache';
53305333 }
53315334 core.debug(`Python is expected to be installed into AGENT_TOOLSDIRECTORY=${process.env['AGENT_TOOLSDIRECTORY']}`);
53325335 process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
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 } from './utils' ;
8+ import { isCacheFeatureAvailable , IS_LINUX , IS_WINDOWS } from './utils' ;
99
1010function isPyPyVersion ( versionSpec : string ) {
1111 return versionSpec . startsWith ( 'pypy' ) ;
@@ -49,8 +49,9 @@ function resolveVersionInput(): string {
4949}
5050
5151async function run ( ) {
52- if ( ! process . env . AGENT_TOOLSDIRECTORY ?. trim ( ) ) {
53- process . env [ 'AGENT_TOOLSDIRECTORY' ] = '/opt/hostedtoolcache' ;
52+ if ( ! IS_WINDOWS && ! process . env . AGENT_TOOLSDIRECTORY ?. trim ( ) ) {
53+ if ( IS_LINUX ) process . env [ 'AGENT_TOOLSDIRECTORY' ] = '/opt/hostedtoolcache' ;
54+ else process . env [ 'AGENT_TOOLSDIRECTORY' ] = '/Users/runner/hostedtoolcache' ;
5455 }
5556 core . debug (
5657 `Python is expected to be installed into AGENT_TOOLSDIRECTORY=${ process . env [ 'AGENT_TOOLSDIRECTORY' ] } `
You can’t perform that action at this time.
0 commit comments