mirror of
https://github.com/actions/setup-node.git
synced 2025-07-24 23:48:24 +02:00
polish code
This commit is contained in:
parent
f3c48890ed
commit
cd6d6a6700
8 changed files with 283 additions and 125 deletions
|
@ -19,6 +19,7 @@ export default class OfficialBuilds extends BaseDistribution {
|
|||
public async getNodeJsInfo() {
|
||||
let manifest: tc.IToolRelease[] | undefined;
|
||||
let nodeVersions: INodeVersion[] | undefined;
|
||||
const osArch = this.translateArchToDistUrl(this.nodeInfo.arch);
|
||||
if (this.isLtsAlias(this.nodeInfo.versionSpec)) {
|
||||
core.info('Attempt to resolve LTS alias from manifest...');
|
||||
|
||||
|
@ -42,7 +43,6 @@ export default class OfficialBuilds extends BaseDistribution {
|
|||
|
||||
if (this.nodeInfo.checkLatest) {
|
||||
core.info('Attempt to resolve the latest version from manifest...');
|
||||
const osArch = this.translateArchToDistUrl(this.nodeInfo.arch);
|
||||
const resolvedVersion = await this.resolveVersionFromManifest(
|
||||
this.nodeInfo.versionSpec,
|
||||
osArch,
|
||||
|
@ -66,7 +66,7 @@ export default class OfficialBuilds extends BaseDistribution {
|
|||
let downloadPath = '';
|
||||
try {
|
||||
core.info(`Attempting to download ${this.nodeInfo.versionSpec}...`);
|
||||
const osArch = this.translateArchToDistUrl(this.nodeInfo.arch);
|
||||
|
||||
const versionInfo = await this.getInfoFromManifest(
|
||||
this.nodeInfo.versionSpec,
|
||||
osArch,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue