@@ -8,18 +8,20 @@ import { isDarwinArmWithRosetta } from '../utils/isDarwinArmWithRosetta';
8
8
import { getAgentExternalsPath } from '../utils/getAgentExternalsPath' ;
9
9
import { getDirContent } from '../utils/getDirContent' ;
10
10
import { NodeOsPlatform , TargetOsInfo } from '../interfaces/os-types' ;
11
+ import { RunnerFolder } from '../constants' ;
11
12
12
13
export async function installNodeRunner ( targetNodeVersion : string , osInfo : TargetOsInfo ) {
13
14
let installedArch = osInfo . osArch ;
14
15
15
16
let targetNodePath : string ;
17
+ let nodeFolderName = RunnerFolder [ toolLib . cleanVersion ( targetNodeVersion ) ] ;
16
18
17
19
// check cache
18
- targetNodePath = toolLib . findLocalTool ( 'node' , targetNodeVersion , installedArch ) ;
20
+ targetNodePath = toolLib . findLocalTool ( nodeFolderName , targetNodeVersion , installedArch ) ;
19
21
20
22
// In case if it's darwin arm and toolPath is empty trying to find x64 version
21
23
if ( ! targetNodePath && isDarwinArmWithRosetta ( osInfo . osPlatform , installedArch ) ) {
22
- targetNodePath = toolLib . findLocalTool ( 'node' , installedArch , 'x64' ) ;
24
+ targetNodePath = toolLib . findLocalTool ( nodeFolderName , installedArch , 'x64' ) ;
23
25
installedArch = 'x64' ;
24
26
}
25
27
@@ -32,7 +34,7 @@ export async function installNodeRunner(targetNodeVersion: string, osInfo: Targe
32
34
) ;
33
35
}
34
36
35
- const resultNodePath = await copyNodeToAgentExternals ( targetNodePath , 'node' , osInfo . osPlatform ) ;
37
+ const resultNodePath = await copyNodeToAgentExternals ( targetNodePath , nodeFolderName , osInfo . osPlatform ) ;
36
38
37
39
taskLib . debug ( 'resultNodePath = ' + resultNodePath ) ;
38
40
0 commit comments