mirror of
				https://kkgithub.com/actions/setup-node.git
				synced 2025-10-31 10:41:57 +08:00 
			
		
		
		
	Update temporary directory creation
This commit is contained in:
		| @ -1,3 +1,4 @@ | ||||
| import {v4 as uuidv4} from 'uuid'; | ||||
| import * as tc from '@actions/tool-cache'; | ||||
| import * as hc from '@actions/http-client'; | ||||
| import * as core from '@actions/core'; | ||||
| @ -167,8 +168,7 @@ export default abstract class BaseDistribution { | ||||
|     const osArch: string = this.translateArchToDistUrl(arch); | ||||
|  | ||||
|     // Create temporary folder to download in to | ||||
|     const tempDownloadFolder: string = | ||||
|       'temp_' + Math.floor(Math.random() * 2000000000); | ||||
|     const tempDownloadFolder = `temp_${uuidv4()}`; | ||||
|     const tempDirectory = process.env['RUNNER_TEMP'] || ''; | ||||
|     assert.ok(tempDirectory, 'Expected RUNNER_TEMP to be defined'); | ||||
|     const tempDir: string = path.join(tempDirectory, tempDownloadFolder); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Nikolai Laevskii
					Nikolai Laevskii