mirror of
				https://kkgithub.com/actions/setup-node.git
				synced 2025-11-04 12:46:16 +08:00 
			
		
		
		
	win change
This commit is contained in:
		
							
								
								
									
										6
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							@ -13014,9 +13014,9 @@ function getNode(versionSpec, stable, token) {
 | 
			
		||||
            let extPath;
 | 
			
		||||
            if (osPlat == 'win32') {
 | 
			
		||||
                let _7zPath = path.join(__dirname, '..', 'externals', '7zr.exe');
 | 
			
		||||
                // 7z extracts to filename folder
 | 
			
		||||
                const srcPath = path.join(downloadPath, `node-v${info.resolvedVersion}-win-${osArch}`);
 | 
			
		||||
                extPath = yield tc.extract7z(srcPath, undefined, _7zPath);
 | 
			
		||||
                extPath = yield tc.extract7z(downloadPath, undefined, _7zPath);
 | 
			
		||||
                // 7z extracts to folder matching file name
 | 
			
		||||
                extPath = path.join(extPath, path.basename(downloadPath));
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
                extPath = yield tc.extractTar(downloadPath, undefined, [
 | 
			
		||||
 | 
			
		||||
@ -75,12 +75,10 @@ export async function getNode(
 | 
			
		||||
    let extPath: string;
 | 
			
		||||
    if (osPlat == 'win32') {
 | 
			
		||||
      let _7zPath = path.join(__dirname, '..', 'externals', '7zr.exe');
 | 
			
		||||
      // 7z extracts to filename folder
 | 
			
		||||
      const srcPath = path.join(
 | 
			
		||||
        downloadPath,
 | 
			
		||||
        `node-v${info.resolvedVersion}-win-${osArch}`
 | 
			
		||||
      );
 | 
			
		||||
      extPath = await tc.extract7z(srcPath, undefined, _7zPath);
 | 
			
		||||
 | 
			
		||||
      extPath = await tc.extract7z(downloadPath, undefined, _7zPath);
 | 
			
		||||
      // 7z extracts to folder matching file name
 | 
			
		||||
      extPath = path.join(extPath, path.basename(downloadPath));
 | 
			
		||||
    } else {
 | 
			
		||||
      extPath = await tc.extractTar(downloadPath, undefined, [
 | 
			
		||||
        'xz',
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user