Use template literals instead of string concatenation

This commit is contained in:
Sergey Dolin
2022-02-21 05:23:19 +00:00
committed by GitHub
parent 011c443f81
commit 65fe6a82c7
2 changed files with 7 additions and 10 deletions

View File

@ -25,16 +25,14 @@ async function cacheDependencies(cache: string, pythonVersion: string) {
}
async function run() {
if (process.env['AGENT_TOOLSDIRECTORY'] !== undefined) {
if (process.env.AGENT_TOOLSDIRECTORY?.trim()) {
core.debug(
'Python is expected to be installed into AGENT_TOOLSDIRECTORY=' +
process.env['AGENT_TOOLSDIRECTORY']
`Python is expected to be installed into AGENT_TOOLSDIRECTORY=${process.env['AGENT_TOOLSDIRECTORY']}`
);
process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
} else {
core.debug(
'Python is expected to be installed into RUNNER_TOOL_CACHE=' +
process.env['RUNNER_TOOL_CACHE']
`Python is expected to be installed into RUNNER_TOOL_CACHE==${process.env['RUNNER_TOOL_CACHE']}`
);
}
try {