mirror of
				https://gitea.com/actions/setup-node.git
				synced 2025-10-31 07:47:14 +00:00 
			
		
		
		
	Compare commits
	
		
			7 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 2fddd8803e | ||
|   | ad8542ca5e | ||
|   | 3d11add771 | ||
|   | 072a2e3b10 | ||
|   | 28ad38fe06 | ||
|   | 48de4c13f6 | ||
|   | aab7cc882a | 
							
								
								
									
										4
									
								
								dist/cache-save/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								dist/cache-save/index.js
									
									
									
									
										vendored
									
									
								
							| @@ -59931,7 +59931,7 @@ exports.supportedPackageManagers = { | ||||
|     }, | ||||
|     pnpm: { | ||||
|         lockFilePatterns: ['pnpm-lock.yaml'], | ||||
|         getCacheFolderCommand: 'pnpm store path' | ||||
|         getCacheFolderCommand: 'pnpm store path --silent' | ||||
|     }, | ||||
|     yarn1: { | ||||
|         lockFilePatterns: ['yarn.lock'], | ||||
| @@ -59986,7 +59986,7 @@ exports.getCacheDirectoryPath = (packageManagerInfo, packageManager) => __awaite | ||||
|         throw new Error(`Could not get cache folder path for ${packageManager}`); | ||||
|     } | ||||
|     core.debug(`${packageManager} path is ${stdOut}`); | ||||
|     return stdOut; | ||||
|     return stdOut.trim(); | ||||
| }); | ||||
| function isGhes() { | ||||
|     const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com'); | ||||
|   | ||||
							
								
								
									
										13
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										13
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							| @@ -71277,7 +71277,7 @@ exports.supportedPackageManagers = { | ||||
|     }, | ||||
|     pnpm: { | ||||
|         lockFilePatterns: ['pnpm-lock.yaml'], | ||||
|         getCacheFolderCommand: 'pnpm store path' | ||||
|         getCacheFolderCommand: 'pnpm store path --silent' | ||||
|     }, | ||||
|     yarn1: { | ||||
|         lockFilePatterns: ['yarn.lock'], | ||||
| @@ -71332,7 +71332,7 @@ exports.getCacheDirectoryPath = (packageManagerInfo, packageManager) => __awaite | ||||
|         throw new Error(`Could not get cache folder path for ${packageManager}`); | ||||
|     } | ||||
|     core.debug(`${packageManager} path is ${stdOut}`); | ||||
|     return stdOut; | ||||
|     return stdOut.trim(); | ||||
| }); | ||||
| function isGhes() { | ||||
|     const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com'); | ||||
| @@ -71846,8 +71846,13 @@ function run() { | ||||
|                 yield installer.getNode(version, stable, checkLatest, auth, arch); | ||||
|             } | ||||
|             // Output version of node is being used
 | ||||
|             const { stdout: installedVersion } = yield exec.getExecOutput('node', ['--version'], { ignoreReturnCode: true }); | ||||
|             core.setOutput('node-version', installedVersion); | ||||
|             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', ''); | ||||
|             } | ||||
|             const registryUrl = core.getInput('registry-url'); | ||||
|             const alwaysAuth = core.getInput('always-auth'); | ||||
|             if (registryUrl) { | ||||
|   | ||||
| @@ -18,7 +18,7 @@ export const supportedPackageManagers: SupportedPackageManagers = { | ||||
|   }, | ||||
|   pnpm: { | ||||
|     lockFilePatterns: ['pnpm-lock.yaml'], | ||||
|     getCacheFolderCommand: 'pnpm store path' | ||||
|     getCacheFolderCommand: 'pnpm store path --silent' | ||||
|   }, | ||||
|   yarn1: { | ||||
|     lockFilePatterns: ['yarn.lock'], | ||||
| @@ -94,7 +94,7 @@ export const getCacheDirectoryPath = async ( | ||||
|  | ||||
|   core.debug(`${packageManager} path is ${stdOut}`); | ||||
|  | ||||
|   return stdOut; | ||||
|   return stdOut.trim(); | ||||
| }; | ||||
|  | ||||
| export function isGhes(): boolean { | ||||
|   | ||||
							
								
								
									
										16
									
								
								src/main.ts
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								src/main.ts
									
									
									
									
									
								
							| @@ -41,12 +41,16 @@ export async function run() { | ||||
|     } | ||||
|  | ||||
|     // Output version of node is being used | ||||
|     const {stdout: installedVersion} = await exec.getExecOutput( | ||||
|       'node', | ||||
|       ['--version'], | ||||
|       {ignoreReturnCode: true} | ||||
|     ); | ||||
|     core.setOutput('node-version', installedVersion); | ||||
|     try { | ||||
|       const {stdout: installedVersion} = await exec.getExecOutput( | ||||
|         'node', | ||||
|         ['--version'], | ||||
|         {ignoreReturnCode: true, silent: true} | ||||
|       ); | ||||
|       core.setOutput('node-version', installedVersion.trim()); | ||||
|     } catch (err) { | ||||
|       core.setOutput('node-version', ''); | ||||
|     } | ||||
|  | ||||
|     const registryUrl: string = core.getInput('registry-url'); | ||||
|     const alwaysAuth: string = core.getInput('always-auth'); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user