parseNodeVersionFile changed from async function

This commit is contained in:
Hargun Kaur 2021-10-07 16:46:55 +00:00 committed by GitHub
parent a03cbe2e3f
commit b94f87b4af
2 changed files with 4 additions and 4 deletions

View file

@ -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(); let nodeVersion = contents.trim();
if (/^v\d/.test(nodeVersion)) { if (/^v\d/.test(nodeVersion)) {

View file

@ -5,7 +5,7 @@ import * as auth from './authutil';
import * as path from 'path'; import * as path from 'path';
import {restoreCache} from './cache-restore'; import {restoreCache} from './cache-restore';
import {URL} from 'url'; import {URL} from 'url';
import os = require('os'); import os from 'os';
export async function run() { export async function run() {
try { try {
@ -76,8 +76,8 @@ export async function run() {
core.info( core.info(
`##[add-matcher]${path.join(matchersPath, 'eslint-compact.json')}` `##[add-matcher]${path.join(matchersPath, 'eslint-compact.json')}`
); );
} catch (error) { } catch (err) {
core.setFailed(error.message); core.setFailed(err.message);
} }
} }