diff --git a/src/installer.ts b/src/installer.ts index 764b1288..ea854a30 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -466,7 +466,7 @@ function translateArchToDistUrl(arch: string): string { } } -export async function parseNodeVersionFile(contents: string): Promise { +export function parseNodeVersionFile(contents: string): string { let nodeVersion = contents.trim(); if (/^v\d/.test(nodeVersion)) { diff --git a/src/main.ts b/src/main.ts index 2d6dc462..4f88448f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -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); } }