mirror of
				https://kkgithub.com/actions/setup-node.git
				synced 2025-10-31 10:41:57 +08:00 
			
		
		
		
	Compare commits
	
		
			2 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 1f8c6b94b2 | |||
| 9a74eb4e64 | 
							
								
								
									
										2
									
								
								.github/workflows/licensed.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/licensed.yml
									
									
									
									
										vendored
									
									
								
							| @ -18,7 +18,7 @@ jobs: | ||||
|       - name: Install licensed | ||||
|         run: | | ||||
|           cd $RUNNER_TEMP | ||||
|           curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/2.12.2/licensed-2.12.2-linux-x64.tar.gz | ||||
|           curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/3.3.1/licensed-3.3.1-linux-x64.tar.gz | ||||
|           sudo tar -xzf licensed.tar.gz | ||||
|           sudo mv licensed /usr/local/bin/licensed | ||||
|       - run: licensed status | ||||
|  | ||||
							
								
								
									
										14
									
								
								dist/cache-save/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								dist/cache-save/index.js
									
									
									
									
										vendored
									
									
								
							| @ -3836,8 +3836,11 @@ exports.supportedPackageManagers = { | ||||
|     } | ||||
| }; | ||||
| exports.getCommandOutput = (toolCommand) => __awaiter(void 0, void 0, void 0, function* () { | ||||
|     const { stdout, stderr, exitCode } = yield exec.getExecOutput(toolCommand); | ||||
|     if (stderr) { | ||||
|     let { stdout, stderr, exitCode } = yield exec.getExecOutput(toolCommand, undefined, { ignoreReturnCode: true }); | ||||
|     if (exitCode) { | ||||
|         stderr = !stderr.trim() | ||||
|             ? `The '${toolCommand}' command failed with exit code: ${exitCode}` | ||||
|             : stderr; | ||||
|         throw new Error(stderr); | ||||
|     } | ||||
|     return stdout.trim(); | ||||
| @ -46976,6 +46979,13 @@ const cache = __importStar(__webpack_require__(692)); | ||||
| const fs_1 = __importDefault(__webpack_require__(747)); | ||||
| const constants_1 = __webpack_require__(196); | ||||
| const cache_utils_1 = __webpack_require__(143); | ||||
| // Catch and log any unhandled exceptions.  These exceptions can leak out of the uploadChunk method in
 | ||||
| // @actions/toolkit when a failed upload closes the file descriptor causing any in-process reads to
 | ||||
| // throw an uncaught exception.  Instead of failing this action, just warn.
 | ||||
| process.on('uncaughtException', e => { | ||||
|     const warningPrefix = '[warning]'; | ||||
|     core.info(`${warningPrefix}${e.message}`); | ||||
| }); | ||||
| function run() { | ||||
|     return __awaiter(this, void 0, void 0, function* () { | ||||
|         try { | ||||
|  | ||||
							
								
								
									
										7
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							| @ -46207,8 +46207,11 @@ exports.supportedPackageManagers = { | ||||
|     } | ||||
| }; | ||||
| exports.getCommandOutput = (toolCommand) => __awaiter(void 0, void 0, void 0, function* () { | ||||
|     const { stdout, stderr, exitCode } = yield exec.getExecOutput(toolCommand); | ||||
|     if (stderr) { | ||||
|     let { stdout, stderr, exitCode } = yield exec.getExecOutput(toolCommand, undefined, { ignoreReturnCode: true }); | ||||
|     if (exitCode) { | ||||
|         stderr = !stderr.trim() | ||||
|             ? `The '${toolCommand}' command failed with exit code: ${exitCode}` | ||||
|             : stderr; | ||||
|         throw new Error(stderr); | ||||
|     } | ||||
|     return stdout.trim(); | ||||
|  | ||||
| @ -4,6 +4,14 @@ import fs from 'fs'; | ||||
| import {State} from './constants'; | ||||
| import {getCacheDirectoryPath, getPackageManagerInfo} from './cache-utils'; | ||||
|  | ||||
| // Catch and log any unhandled exceptions.  These exceptions can leak out of the uploadChunk method in | ||||
| // @actions/toolkit when a failed upload closes the file descriptor causing any in-process reads to | ||||
| // throw an uncaught exception.  Instead of failing this action, just warn. | ||||
| process.on('uncaughtException', e => { | ||||
|   const warningPrefix = '[warning]'; | ||||
|   core.info(`${warningPrefix}${e.message}`); | ||||
| }); | ||||
|  | ||||
| export async function run() { | ||||
|   try { | ||||
|     const cacheLock = core.getInput('cache'); | ||||
|  | ||||
| @ -30,9 +30,16 @@ export const supportedPackageManagers: SupportedPackageManagers = { | ||||
| }; | ||||
|  | ||||
| export const getCommandOutput = async (toolCommand: string) => { | ||||
|   const {stdout, stderr, exitCode} = await exec.getExecOutput(toolCommand); | ||||
|   let {stdout, stderr, exitCode} = await exec.getExecOutput( | ||||
|     toolCommand, | ||||
|     undefined, | ||||
|     {ignoreReturnCode: true} | ||||
|   ); | ||||
|  | ||||
|   if (stderr) { | ||||
|   if (exitCode) { | ||||
|     stderr = !stderr.trim() | ||||
|       ? `The '${toolCommand}' command failed with exit code: ${exitCode}` | ||||
|       : stderr; | ||||
|     throw new Error(stderr); | ||||
|   } | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	