mirror of
				https://github.com/actions/setup-node.git
				synced 2025-11-04 01:33:33 +00:00 
			
		
		
		
	Update dist
This commit is contained in:
		
							parent
							
								
									8ba370a949
								
							
						
					
					
						commit
						6ba41b7436
					
				
							
								
								
									
										29
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										29
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							@ -71855,14 +71855,7 @@ function run() {
 | 
			
		||||
                const checkLatest = (core.getInput('check-latest') || 'false').toUpperCase() === 'TRUE';
 | 
			
		||||
                yield installer.getNode(version, stable, checkLatest, auth, arch);
 | 
			
		||||
            }
 | 
			
		||||
            // Output version of node is being used
 | 
			
		||||
            try {
 | 
			
		||||
                const { stdout: installedVersion } = yield exec.getExecOutput('node', ['--version'], { ignoreReturnCode: true, silent: true });
 | 
			
		||||
                core.setOutput('node-version', installedVersion.trim());
 | 
			
		||||
            }
 | 
			
		||||
            catch (err) {
 | 
			
		||||
                core.setOutput('node-version', '');
 | 
			
		||||
            }
 | 
			
		||||
            yield printEnvDetailsAndSetOutput();
 | 
			
		||||
            const registryUrl = core.getInput('registry-url');
 | 
			
		||||
            const alwaysAuth = core.getInput('always-auth');
 | 
			
		||||
            if (registryUrl) {
 | 
			
		||||
@ -71902,6 +71895,26 @@ function resolveVersionInput() {
 | 
			
		||||
    }
 | 
			
		||||
    return version;
 | 
			
		||||
}
 | 
			
		||||
function printEnvDetailsAndSetOutput() {
 | 
			
		||||
    return __awaiter(this, void 0, void 0, function* () {
 | 
			
		||||
        core.startGroup("Environment details");
 | 
			
		||||
        // Output version of node is being used
 | 
			
		||||
        try {
 | 
			
		||||
            const { stdout: installedNodeVersion } = yield exec.getExecOutput('node', ['--version'], { ignoreReturnCode: true });
 | 
			
		||||
            core.setOutput('node-version', installedNodeVersion.trim());
 | 
			
		||||
        }
 | 
			
		||||
        catch (err) {
 | 
			
		||||
            core.setOutput('node-version', '');
 | 
			
		||||
        }
 | 
			
		||||
        yield exec.getExecOutput('npm', ['--version'], {
 | 
			
		||||
            ignoreReturnCode: true
 | 
			
		||||
        });
 | 
			
		||||
        yield exec.getExecOutput('yarn', ['--version'], {
 | 
			
		||||
            ignoreReturnCode: true
 | 
			
		||||
        });
 | 
			
		||||
        core.endGroup();
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
 | 
			
		||||
@ -6,7 +6,6 @@ import * as auth from './authutil';
 | 
			
		||||
import * as path from 'path';
 | 
			
		||||
import {restoreCache} from './cache-restore';
 | 
			
		||||
import {isGhes, isCacheFeatureAvailable} from './cache-utils';
 | 
			
		||||
import { URL } from 'url';
 | 
			
		||||
import os = require('os');
 | 
			
		||||
 | 
			
		||||
export async function run() {
 | 
			
		||||
@ -101,9 +100,7 @@ function resolveVersionInput(): string {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
async function printEnvDetailsAndSetOutput() {
 | 
			
		||||
  const groupName = "Environment details";
 | 
			
		||||
 | 
			
		||||
  core.startGroup(groupName);
 | 
			
		||||
  core.startGroup("Environment details");
 | 
			
		||||
  // Output version of node is being used
 | 
			
		||||
  try {
 | 
			
		||||
    const {stdout: installedNodeVersion} = await exec.getExecOutput(
 | 
			
		||||
@ -124,5 +121,5 @@ async function printEnvDetailsAndSetOutput() {
 | 
			
		||||
    ignoreReturnCode: true
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  core.endGroup(groupName);
 | 
			
		||||
  core.endGroup();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user