mirror of
				https://github.com/actions/setup-node.git
				synced 2025-11-04 07:33:34 +00:00 
			
		
		
		
	Update installer.js
This commit is contained in:
		
							parent
							
								
									f4b7bb66b5
								
							
						
					
					
						commit
						8d03e45fdd
					
				@ -205,18 +205,18 @@ function acquireNodeFromFallbackLocation(version) {
 | 
				
			|||||||
            exeUrl = `https://nodejs.org/dist/v${version}/win-${os.arch()}/node.exe`;
 | 
					            exeUrl = `https://nodejs.org/dist/v${version}/win-${os.arch()}/node.exe`;
 | 
				
			||||||
            libUrl = `https://nodejs.org/dist/v${version}/win-${os.arch()}/node.lib`;
 | 
					            libUrl = `https://nodejs.org/dist/v${version}/win-${os.arch()}/node.lib`;
 | 
				
			||||||
            const exePath = yield tc.downloadTool(exeUrl);
 | 
					            const exePath = yield tc.downloadTool(exeUrl);
 | 
				
			||||||
            yield io.cp(exePath, path.join(tempDir, 'node.exe'), {recursive: true});
 | 
					            yield io.cp(exePath, path.join(tempDir, 'node.exe'));
 | 
				
			||||||
            const libPath = yield tc.downloadTool(libUrl);
 | 
					            const libPath = yield tc.downloadTool(libUrl);
 | 
				
			||||||
            yield io.cp(libPath, path.join(tempDir, 'node.lib'), {recursive: true});
 | 
					            yield io.cp(libPath, path.join(tempDir, 'node.lib'));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        catch (err) {
 | 
					        catch (err) {
 | 
				
			||||||
            if (err instanceof tc.HTTPError && err.httpStatusCode == 404) {
 | 
					            if (err instanceof tc.HTTPError && err.httpStatusCode == 404) {
 | 
				
			||||||
                exeUrl = `https://nodejs.org/dist/v${version}/node.exe`;
 | 
					                exeUrl = `https://nodejs.org/dist/v${version}/node.exe`;
 | 
				
			||||||
                libUrl = `https://nodejs.org/dist/v${version}/node.lib`;
 | 
					                libUrl = `https://nodejs.org/dist/v${version}/node.lib`;
 | 
				
			||||||
                const exePath = yield tc.downloadTool(exeUrl);
 | 
					                const exePath = yield tc.downloadTool(exeUrl);
 | 
				
			||||||
                yield io.mv(exePath, path.join(tempDir, 'node.exe'));
 | 
					                yield io.cp(exePath, path.join(tempDir, 'node.exe'));
 | 
				
			||||||
                const libPath = yield tc.downloadTool(libUrl);
 | 
					                const libPath = yield tc.downloadTool(libUrl);
 | 
				
			||||||
                yield io.mv(libPath, path.join(tempDir, 'node.lib'));
 | 
					                yield io.cp(libPath, path.join(tempDir, 'node.lib'));
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            else {
 | 
					            else {
 | 
				
			||||||
                throw err;
 | 
					                throw err;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user