Merge branch 'main' into v-dmshib/action-to-node20

This commit is contained in:
Dmitry Shibanov 2023-10-09 13:54:44 +02:00
commit d534e90ed0
2 changed files with 23 additions and 3 deletions

20
.licenses/npm/uuid-9.0.0.dep.yml generated Normal file
View file

@ -0,0 +1,20 @@
---
name: uuid
version: 9.0.0
type: npm
summary: RFC4122 (v1, v4, and v5) UUIDs
homepage:
license: mit
licenses:
- sources: LICENSE.md
text: |
The MIT License (MIT)
Copyright (c) 2010-2020 Robert Kieffer and other contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
notices: []

View file

@ -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';
@ -166,9 +167,8 @@ export default abstract class BaseDistribution {
const initialUrl = this.getDistributionUrl();
const osArch: string = this.translateArchToDistUrl(arch);
// Create temporary folder to download in to
const tempDownloadFolder: string =
'temp_' + Math.floor(Math.random() * 2000000000);
// Create temporary folder to download to
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);