npm run test update

This commit is contained in:
Aparna Jyothi 2025-02-21 13:16:46 +05:30
parent 07b84a2324
commit e5561a4d32
8 changed files with 105 additions and 579 deletions

View file

@ -16,11 +16,6 @@ export default class OfficialBuilds extends BaseDistribution {
public async setupNodeJs() {
if (this.nodeInfo.mirrorURL) {
if (this.nodeInfo.mirrorURL === '') {
throw new Error(
'Mirror URL is empty. Please provide a valid mirror URL.'
);
}
let downloadPath = '';
try {
@ -32,9 +27,12 @@ export default class OfficialBuilds extends BaseDistribution {
}
} catch (err) {
core.info((err as Error).message);
core.info('Download failed');
core.debug((err as Error).stack ?? 'empty stack');
}
} else {
core.info('No mirror URL found. Falling back to default setup...');
core.info('Setup Node.js');
let manifest: tc.IToolRelease[] | undefined;
let nodeJsVersions: INodeVersion[] | undefined;
const osArch = this.translateArchToDistUrl(this.nodeInfo.arch);

View file

@ -2,10 +2,6 @@ import BaseDistribution from '../base-distribution';
import {NodeInputs} from '../base-models';
export default class RcBuild extends BaseDistribution {
getDistributionMirrorUrl() {
throw new Error('Method not implemented.');
}
constructor(nodeInfo: NodeInputs) {
super(nodeInfo);
}

View file

@ -33,7 +33,12 @@ export async function run() {
arch = os.arch();
}
const mirrorURL = core.getInput('mirror-url').trim(); // .trim() to remove any accidental spaces
const mirrorURL = core.getInput('mirror-url');
if (mirrorURL === ' ' && mirrorURL === undefined) {
core.error(
'Mirror URL is emptry or undefined. The default mirror URL will be used.'
);
}
if (version) {
const token = core.getInput('token');
@ -116,3 +121,6 @@ function resolveVersionInput(): string {
return version;
}
export function setupNodeJs(mirrorURL: string) {
throw new Error('Function not implemented.');
}