mirror of https://github.com/actions/setup-node
User agent
This commit is contained in:
parent
dd2e8a486f
commit
1c24df3126
|
@ -103,7 +103,7 @@ function queryLatestMatch(versionSpec) {
|
||||||
}
|
}
|
||||||
let versions = [];
|
let versions = [];
|
||||||
let dataUrl = 'https://nodejs.org/dist/index.json';
|
let dataUrl = 'https://nodejs.org/dist/index.json';
|
||||||
let rest = new restm.RestClient('vsts-node-tool');
|
let rest = new restm.RestClient('setup-node');
|
||||||
let nodeVersions = (yield rest.get(dataUrl)).result || [];
|
let nodeVersions = (yield rest.get(dataUrl)).result || [];
|
||||||
nodeVersions.forEach((nodeVersion) => {
|
nodeVersions.forEach((nodeVersion) => {
|
||||||
// ensure this version supports your os and platform
|
// ensure this version supports your os and platform
|
||||||
|
|
|
@ -100,7 +100,7 @@ async function queryLatestMatch(versionSpec: string): Promise<string> {
|
||||||
|
|
||||||
let versions: string[] = [];
|
let versions: string[] = [];
|
||||||
let dataUrl = 'https://nodejs.org/dist/index.json';
|
let dataUrl = 'https://nodejs.org/dist/index.json';
|
||||||
let rest: restm.RestClient = new restm.RestClient('vsts-node-tool');
|
let rest: restm.RestClient = new restm.RestClient('setup-node');
|
||||||
let nodeVersions: INodeVersion[] =
|
let nodeVersions: INodeVersion[] =
|
||||||
(await rest.get<INodeVersion[]>(dataUrl)).result || [];
|
(await rest.get<INodeVersion[]>(dataUrl)).result || [];
|
||||||
nodeVersions.forEach((nodeVersion: INodeVersion) => {
|
nodeVersions.forEach((nodeVersion: INodeVersion) => {
|
||||||
|
|
Loading…
Reference in New Issue