mirror of
https://github.com/trympet/nextcloud-artifacts-action.git
synced 2025-07-13 05:35:38 +02:00
fix IO await
This commit is contained in:
@ -168,14 +168,17 @@ export class NextcloudClient {
|
||||
|
||||
fileStream.pipe(remoteStream)
|
||||
|
||||
// see: https://github.com/nodejs/node/issues/22088
|
||||
const timer = setTimeout(() => {}, 20_000);
|
||||
await new Promise<void>((resolve, reject) => {
|
||||
fileStream.on('error', e => reject(e)).on('close', () => resolve())
|
||||
})
|
||||
|
||||
|
||||
await new Promise<void>((resolve, reject) => {
|
||||
remoteStream.on('error', e => reject(e)).on('close', () => resolve())
|
||||
})
|
||||
|
||||
clearTimeout(timer);
|
||||
return remoteFilePath
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user