mirror of
				https://github.com/actions/setup-node.git
				synced 2025-10-31 16:14:00 +08:00 
			
		
		
		
	Pass to warning uncaught exceptions (#359)
This commit is contained in:
		| @@ -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'); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Dmitry Shibanov
					Dmitry Shibanov