mirror of
https://github.com/actions/download-artifact.git
synced 2025-07-26 16:38:28 +02:00
feat: Add support for #143 - add flag to pipeResponseToFile
Adding a flag that will skip the gzip decode step
This commit is contained in:
parent
fb598a63ae
commit
c3b37cf849
1 changed files with 3 additions and 3 deletions
4
dist/index.js
vendored
4
dist/index.js
vendored
|
@ -7299,10 +7299,10 @@ class DownloadHttpClient {
|
||||||
* @param destinationStream the stream where the file should be written to
|
* @param destinationStream the stream where the file should be written to
|
||||||
* @param isGzip a boolean denoting if the content is compressed using gzip and if we need to decode it
|
* @param isGzip a boolean denoting if the content is compressed using gzip and if we need to decode it
|
||||||
*/
|
*/
|
||||||
pipeResponseToFile(response, destinationStream, isGzip) {
|
pipeResponseToFile(response, destinationStream, isGzip, forceGzip) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
yield new Promise((resolve, reject) => {
|
yield new Promise((resolve, reject) => {
|
||||||
if (isGzip) {
|
if (isGzip && !forceGzip) {
|
||||||
const gunzip = zlib.createGunzip();
|
const gunzip = zlib.createGunzip();
|
||||||
response.message
|
response.message
|
||||||
.on('error', error => {
|
.on('error', error => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue