|
|
@ -1,4 +1,5 @@
|
|
|
|
import * as core from '@actions/core';
|
|
|
|
import * as core from '@actions/core';
|
|
|
|
|
|
|
|
import * as exec from '@actions/exec';
|
|
|
|
import * as installer from './installer';
|
|
|
|
import * as installer from './installer';
|
|
|
|
import fs from 'fs';
|
|
|
|
import fs from 'fs';
|
|
|
|
import * as auth from './authutil';
|
|
|
|
import * as auth from './authutil';
|
|
|
@ -39,6 +40,17 @@ export async function run() {
|
|
|
|
await installer.getNode(version, stable, checkLatest, auth, arch);
|
|
|
|
await installer.getNode(version, stable, checkLatest, auth, arch);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Output version of node is being used
|
|
|
|
|
|
|
|
let installedVersion = '';
|
|
|
|
|
|
|
|
await exec.exec('node', ['--version'], {
|
|
|
|
|
|
|
|
listeners: {
|
|
|
|
|
|
|
|
stdout: data => {
|
|
|
|
|
|
|
|
installedVersion += data.toString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
core.setOutput('node-version', installedVersion);
|
|
|
|
|
|
|
|
|
|
|
|
const registryUrl: string = core.getInput('registry-url');
|
|
|
|
const registryUrl: string = core.getInput('registry-url');
|
|
|
|
const alwaysAuth: string = core.getInput('always-auth');
|
|
|
|
const alwaysAuth: string = core.getInput('always-auth');
|
|
|
|
if (registryUrl) {
|
|
|
|
if (registryUrl) {
|
|
|
|