1
0
Fork 0
mirror of https://code.forgejo.org/actions/download-artifact.git synced 2024-11-14 02:26:16 +01:00

more patches

This commit is contained in:
Rob Herley 2023-12-09 17:24:52 -05:00
parent 621be0be95
commit d2e17e8b67
No known key found for this signature in database
GPG key ID: D1602042C3543B06

7
dist/index.js vendored
View file

@ -7864,7 +7864,12 @@ function streamExtract(url, directory) {
if (response.message.statusCode !== 200) { if (response.message.statusCode !== 200) {
throw new Error(`Unexpected HTTP response from blob storage: ${response.message.statusCode} ${response.message.statusMessage}`); throw new Error(`Unexpected HTTP response from blob storage: ${response.message.statusCode} ${response.message.statusMessage}`);
} }
return response.message.pipe(unzip_stream_1.default.Extract({ path: directory })).promise(); return new Promise((resolve, reject) => {
response.message
.pipe(unzip_stream_1.default.Extract({ path: directory }))
.on('close', resolve)
.on('error', reject);
});
}); });
} }
function downloadArtifactPublic(artifactId, repositoryOwner, repositoryName, token, options) { function downloadArtifactPublic(artifactId, repositoryOwner, repositoryName, token, options) {