mirror of
https://github.com/actions/setup-node.git
synced 2025-07-26 00:18:25 +02:00
updated test cases
This commit is contained in:
parent
e5561a4d32
commit
7a5031f96f
9 changed files with 172 additions and 272 deletions
17
src/main.ts
17
src/main.ts
|
@ -7,7 +7,11 @@ import * as path from 'path';
|
|||
import {restoreCache} from './cache-restore';
|
||||
import {isCacheFeatureAvailable} from './cache-utils';
|
||||
import {getNodejsDistribution} from './distributions/installer-factory';
|
||||
import {getNodeVersionFromFile, printEnvDetailsAndSetOutput} from './util';
|
||||
import {
|
||||
getNodeVersionFromFile,
|
||||
printEnvDetailsAndSetOutput,
|
||||
validateMirrorURL
|
||||
} from './util';
|
||||
import {State} from './constants';
|
||||
|
||||
export async function run() {
|
||||
|
@ -33,12 +37,8 @@ export async function run() {
|
|||
arch = os.arch();
|
||||
}
|
||||
|
||||
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.'
|
||||
);
|
||||
}
|
||||
const mirrorurl = core.getInput('mirror-url');
|
||||
const mirrorURL = validateMirrorURL(mirrorurl);
|
||||
|
||||
if (version) {
|
||||
const token = core.getInput('token');
|
||||
|
@ -121,6 +121,3 @@ function resolveVersionInput(): string {
|
|||
|
||||
return version;
|
||||
}
|
||||
export function setupNodeJs(mirrorURL: string) {
|
||||
throw new Error('Function not implemented.');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue