mirror of
				https://github.com/actions/setup-node.git
				synced 2025-11-04 01:13:35 +00:00 
			
		
		
		
	parseNodeVersionFile changed from async function
This commit is contained in:
		
							parent
							
								
									a03cbe2e3f
								
							
						
					
					
						commit
						b94f87b4af
					
				@ -466,7 +466,7 @@ function translateArchToDistUrl(arch: string): string {
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export async function parseNodeVersionFile(contents: string): Promise<string> {
 | 
			
		||||
export function parseNodeVersionFile(contents: string): string {
 | 
			
		||||
  let nodeVersion = contents.trim();
 | 
			
		||||
 | 
			
		||||
  if (/^v\d/.test(nodeVersion)) {
 | 
			
		||||
 | 
			
		||||
@ -5,7 +5,7 @@ import * as auth from './authutil';
 | 
			
		||||
import * as path from 'path';
 | 
			
		||||
import {restoreCache} from './cache-restore';
 | 
			
		||||
import {URL} from 'url';
 | 
			
		||||
import os = require('os');
 | 
			
		||||
import os from 'os';
 | 
			
		||||
 | 
			
		||||
export async function run() {
 | 
			
		||||
  try {
 | 
			
		||||
@ -76,8 +76,8 @@ export async function run() {
 | 
			
		||||
    core.info(
 | 
			
		||||
      `##[add-matcher]${path.join(matchersPath, 'eslint-compact.json')}`
 | 
			
		||||
    );
 | 
			
		||||
  } catch (error) {
 | 
			
		||||
    core.setFailed(error.message);
 | 
			
		||||
  } catch (err) {
 | 
			
		||||
    core.setFailed(err.message);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user