mirror of https://github.com/actions/toolkit
adding v4 refs
parent
20e4693a58
commit
1f9297afe5
|
@ -10,7 +10,7 @@ import * as stream from 'stream'
|
||||||
import * as util from 'util'
|
import * as util from 'util'
|
||||||
import {ok} from 'assert'
|
import {ok} from 'assert'
|
||||||
import {OutgoingHttpHeaders} from 'http'
|
import {OutgoingHttpHeaders} from 'http'
|
||||||
import uuidV4 from 'uuid';
|
import {v4 as uuidv4} from 'uuid'
|
||||||
|
|
||||||
import {exec} from '@actions/exec/lib/exec'
|
import {exec} from '@actions/exec/lib/exec'
|
||||||
import {ExecOptions} from '@actions/exec/lib/interfaces'
|
import {ExecOptions} from '@actions/exec/lib/interfaces'
|
||||||
|
@ -42,7 +42,7 @@ export async function downloadTool(
|
||||||
auth?: string,
|
auth?: string,
|
||||||
headers?: OutgoingHttpHeaders
|
headers?: OutgoingHttpHeaders
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
dest = dest || path.join(_getTempDirectory(), uuidV4())
|
dest = dest || path.join(_getTempDirectory(), v4())
|
||||||
await io.mkdirP(path.dirname(dest))
|
await io.mkdirP(path.dirname(dest))
|
||||||
core.debug(`Downloading ${url}`)
|
core.debug(`Downloading ${url}`)
|
||||||
core.debug(`Destination ${dest}`)
|
core.debug(`Destination ${dest}`)
|
||||||
|
@ -652,7 +652,7 @@ export async function findFromManifest(
|
||||||
async function _createExtractFolder(dest?: string): Promise<string> {
|
async function _createExtractFolder(dest?: string): Promise<string> {
|
||||||
if (!dest) {
|
if (!dest) {
|
||||||
// create a temp dir
|
// create a temp dir
|
||||||
dest = path.join(_getTempDirectory(), uuidV4())
|
dest = path.join(_getTempDirectory(), v4())
|
||||||
}
|
}
|
||||||
await io.mkdirP(dest)
|
await io.mkdirP(dest)
|
||||||
return dest
|
return dest
|
||||||
|
|
Loading…
Reference in New Issue