mirror of
https://gitea.com/actions/setup-node.git
synced 2025-11-10 03:06:25 +08:00
Release from master
This commit is contained in:
@@ -24,6 +24,9 @@ function writeRegistryToFile(registryUrl: string, fileLocation: string) {
|
||||
if (scope && scope[0] != '@') {
|
||||
scope = '@' + scope;
|
||||
}
|
||||
if (scope) {
|
||||
scope = scope.toLowerCase();
|
||||
}
|
||||
|
||||
core.debug(`Setting auth in ${fileLocation}`);
|
||||
let newContents: string = '';
|
||||
|
||||
@@ -100,7 +100,7 @@ async function queryLatestMatch(versionSpec: string): Promise<string> {
|
||||
|
||||
let versions: string[] = [];
|
||||
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[] =
|
||||
(await rest.get<INodeVersion[]>(dataUrl)).result || [];
|
||||
nodeVersions.forEach((nodeVersion: INodeVersion) => {
|
||||
|
||||
@@ -9,7 +9,10 @@ async function run() {
|
||||
// Version is optional. If supplied, install / use from the tool cache
|
||||
// If not supplied then task is still used to setup proxy, auth, etc...
|
||||
//
|
||||
const version = core.getInput('version');
|
||||
let version = core.getInput('version');
|
||||
if (!version) {
|
||||
version = core.getInput('node-version');
|
||||
}
|
||||
if (version) {
|
||||
// TODO: installer doesn't support proxy
|
||||
await installer.getNode(version);
|
||||
|
||||
Reference in New Issue
Block a user