mirror of
				https://kkgithub.com/actions/setup-node.git
				synced 2025-11-04 04:31:55 +08:00 
			
		
		
		
	dbg
This commit is contained in:
		
							
								
								
									
										9
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							@ -13013,15 +13013,22 @@ function getNode(versionSpec, stable, token) {
 | 
				
			|||||||
            //
 | 
					            //
 | 
				
			||||||
            // Extract
 | 
					            // Extract
 | 
				
			||||||
            //
 | 
					            //
 | 
				
			||||||
 | 
					            console.log(`Extracting ${downloadPath}`);
 | 
				
			||||||
 | 
					            if (!fs.existsSync(downloadPath)) {
 | 
				
			||||||
 | 
					                console.log('File not downloaded correctly');
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            let extPath;
 | 
					            let extPath;
 | 
				
			||||||
            if (osPlat == 'win32') {
 | 
					            if (osPlat == 'win32') {
 | 
				
			||||||
                let _7zPath = path.join(__dirname, '..', 'externals', '7zr.exe');
 | 
					                let _7zPath = path.join(__dirname, '..', 'externals', '7zr.exe');
 | 
				
			||||||
                extPath = yield tc.extract7z(downloadPath, undefined, _7zPath);
 | 
					                extPath = yield tc.extract7z(downloadPath, undefined, _7zPath);
 | 
				
			||||||
 | 
					                console.log(`contents of ${extPath}`);
 | 
				
			||||||
 | 
					                console.log(extPath);
 | 
				
			||||||
                // 7z extracts to folder matching file name
 | 
					                // 7z extracts to folder matching file name
 | 
				
			||||||
                let nestedPath = path.join(extPath, path.basename(info.fileName, '.7z'));
 | 
					                let nestedPath = path.join(extPath, path.basename(info.fileName, '.7z'));
 | 
				
			||||||
                if (fs.statSync(nestedPath) && fs.statSync(nestedPath).isDirectory()) {
 | 
					                if (fs.existsSync(nestedPath)) {
 | 
				
			||||||
                    extPath = nestedPath;
 | 
					                    extPath = nestedPath;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					                console.log(`using ${extPath}`);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            else {
 | 
					            else {
 | 
				
			||||||
                extPath = yield tc.extractTar(downloadPath, undefined, [
 | 
					                extPath = yield tc.extractTar(downloadPath, undefined, [
 | 
				
			||||||
 | 
				
			|||||||
@ -74,9 +74,9 @@ export async function getNode(
 | 
				
			|||||||
    //
 | 
					    //
 | 
				
			||||||
    // Extract
 | 
					    // Extract
 | 
				
			||||||
    //
 | 
					    //
 | 
				
			||||||
    console.log(`Extracting ${downloadPath}`)
 | 
					    console.log(`Extracting ${downloadPath}`);
 | 
				
			||||||
    if (!fs.existsSync(downloadPath)) {
 | 
					    if (!fs.existsSync(downloadPath)) {
 | 
				
			||||||
      throw new Error('File not downloaded correctly');
 | 
					      console.log('File not downloaded correctly');
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    let extPath: string;
 | 
					    let extPath: string;
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user