mirror of
				https://github.com/actions/setup-node.git
				synced 2025-11-04 13:43:35 +00:00 
			
		
		
		
	fix: update dist file
This commit is contained in:
		
							parent
							
								
									b6fd2d4ad9
								
							
						
					
					
						commit
						b5845a9e76
					
				
							
								
								
									
										13
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										13
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							@ -71448,11 +71448,16 @@ function getNode(versionSpec, stable, checkLatest, auth, arch = os.arch()) {
 | 
			
		||||
        // If not found in cache, download
 | 
			
		||||
        if (toolPath) {
 | 
			
		||||
            core.info(`Found in cache @ ${toolPath}`);
 | 
			
		||||
            const { stdout: installedVersion } = yield exec.getExecOutput('node', ['--version'], { ignoreReturnCode: true });
 | 
			
		||||
            if (!semver.satisfies(installedVersion, versionSpec)) {
 | 
			
		||||
                core.info(`Found ${installedVersion} in cache @ ${toolPath} but it does not satisfy the requested version (${versionSpec})`);
 | 
			
		||||
                toolPath = '';
 | 
			
		||||
            if (osPlat != 'win32') {
 | 
			
		||||
                toolPath = path.join(toolPath, 'bin');
 | 
			
		||||
            }
 | 
			
		||||
            core.addPath(toolPath);
 | 
			
		||||
            const { stdout: installedVersion } = yield exec.getExecOutput('node', ['--version'], { ignoreReturnCode: true });
 | 
			
		||||
            if (semver.satisfies(installedVersion, versionSpec)) {
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
            core.info(`Found ${installedVersion} in cache @ ${toolPath} but it does not satisfy the requested version (${versionSpec})`);
 | 
			
		||||
            toolPath = '';
 | 
			
		||||
        }
 | 
			
		||||
        if (!toolPath) {
 | 
			
		||||
            core.info(`Attempting to download ${versionSpec}...`);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user