mirror of
https://github.com/actions/download-artifact.git
synced 2025-07-26 00:18:30 +02:00
move download finish to then statement
Signed-off-by: Eli Uriegas <eliuriegas@fb.com>
This commit is contained in:
parent
fdf1695da1
commit
c7a6943d3b
3 changed files with 9 additions and 11 deletions
9
dist/index.js
vendored
9
dist/index.js
vendored
|
@ -31181,10 +31181,7 @@ function doDownload(s3, s3Bucket, fileKey, localKey) {
|
|||
core.debug(`S3 download uri: s3://${s3Bucket}/${fileKey}`);
|
||||
const readStream = s3.getObject(getObjectParams).createReadStream();
|
||||
readStream.pipe(writeStream);
|
||||
readStream.on('close', () => {
|
||||
core.info(`Finished download: ${localKey}`);
|
||||
resolve;
|
||||
});
|
||||
readStream.on('close', resolve);
|
||||
readStream.on('error', reject);
|
||||
});
|
||||
}
|
||||
|
@ -31221,7 +31218,9 @@ function run() {
|
|||
continue;
|
||||
}
|
||||
const localKey = path_1.default.join(resolvedPath, fileObject.Key.replace(s3Prefix, ''));
|
||||
yield doDownload(s3, s3Bucket, fileObject.Key, localKey);
|
||||
yield doDownload(s3, s3Bucket, fileObject.Key, localKey).then(() => {
|
||||
core.info(`Finished download: ${localKey}`);
|
||||
});
|
||||
}
|
||||
// output the directory that the artifact(s) was/were downloaded to
|
||||
// if no path is provided, an empty string resolves to the current working directory
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue