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

View file

@ -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);
}
}