mirror of
https://github.com/actions/setup-node.git
synced 2025-04-22 17:26:27 +00:00
parseNodeVersionFile changed from async function
This commit is contained in:
parent
a03cbe2e3f
commit
b94f87b4af
2 changed files with 4 additions and 4 deletions
|
@ -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)) {
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue