File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed
Filter options
Expand file tree Collapse file tree 2 files changed +7
-10
lines changed
Original file line number Diff line number Diff line change @@ -6644,15 +6644,14 @@ function cacheDependencies(cache, pythonVersion) {
6644
6644
});
6645
6645
}
6646
6646
function run() {
6647
+ var _a;
6647
6648
return __awaiter(this, void 0, void 0, function* () {
6648
- if (process.env['AGENT_TOOLSDIRECTORY'] !== undefined) {
6649
- core.debug('Python is expected to be installed into AGENT_TOOLSDIRECTORY=' +
6650
- process.env['AGENT_TOOLSDIRECTORY']);
6649
+ if ((_a = process.env.AGENT_TOOLSDIRECTORY) === null || _a === void 0 ? void 0 : _a.trim()) {
6650
+ core.debug(`Python is expected to be installed into AGENT_TOOLSDIRECTORY=${process.env['AGENT_TOOLSDIRECTORY']}`);
6651
6651
process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
6652
6652
}
6653
6653
else {
6654
- core.debug('Python is expected to be installed into RUNNER_TOOL_CACHE=' +
6655
- process.env['RUNNER_TOOL_CACHE']);
6654
+ core.debug(`Python is expected to be installed into RUNNER_TOOL_CACHE==${process.env['RUNNER_TOOL_CACHE']}`);
6656
6655
}
6657
6656
try {
6658
6657
const version = core.getInput('python-version');
Original file line number Diff line number Diff line change @@ -25,16 +25,14 @@ async function cacheDependencies(cache: string, pythonVersion: string) {
25
25
}
26
26
27
27
async function run ( ) {
28
- if ( process . env [ ' AGENT_TOOLSDIRECTORY' ] !== undefined ) {
28
+ if ( process . env . AGENT_TOOLSDIRECTORY ?. trim ( ) ) {
29
29
core . debug (
30
- 'Python is expected to be installed into AGENT_TOOLSDIRECTORY=' +
31
- process . env [ 'AGENT_TOOLSDIRECTORY' ]
30
+ `Python is expected to be installed into AGENT_TOOLSDIRECTORY=${ process . env [ 'AGENT_TOOLSDIRECTORY' ] } `
32
31
) ;
33
32
process . env [ 'RUNNER_TOOL_CACHE' ] = process . env [ 'AGENT_TOOLSDIRECTORY' ] ;
34
33
} else {
35
34
core . debug (
36
- 'Python is expected to be installed into RUNNER_TOOL_CACHE=' +
37
- process . env [ 'RUNNER_TOOL_CACHE' ]
35
+ `Python is expected to be installed into RUNNER_TOOL_CACHE==${ process . env [ 'RUNNER_TOOL_CACHE' ] } `
38
36
) ;
39
37
}
40
38
try {
You can’t perform that action at this time.
0 commit comments