mirror of
https://github.com/actions/toolkit
synced 2025-05-10 00:53:10 +00:00
replace unzipper with unzip-stream
This commit is contained in:
parent
950e1711a1
commit
3c3af56b29
3 changed files with 28 additions and 2 deletions
|
@ -2,7 +2,7 @@ import fs from 'fs/promises'
|
|||
import * as github from '@actions/github'
|
||||
import * as core from '@actions/core'
|
||||
import * as httpClient from '@actions/http-client'
|
||||
import unzipper from 'unzipper'
|
||||
import unzip from 'unzip-stream'
|
||||
import {
|
||||
DownloadArtifactOptions,
|
||||
DownloadArtifactResponse
|
||||
|
@ -47,7 +47,12 @@ async function streamExtract(url: string, directory: string): Promise<void> {
|
|||
)
|
||||
}
|
||||
|
||||
return response.message.pipe(unzipper.Extract({path: directory})).promise()
|
||||
return new Promise((resolve, reject) => {
|
||||
response.message
|
||||
.pipe(unzip.Extract({path: directory}))
|
||||
.on('close', resolve)
|
||||
.on('error', reject)
|
||||
})
|
||||
}
|
||||
|
||||
export async function downloadArtifactPublic(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue