mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2025-08-10 14:58:59 +08:00
Try close stream before unlink
This commit is contained in:
parent
d4e990d92f
commit
a600dd34a5
@ -223,6 +223,7 @@ export class DownloadHttpClient {
|
|||||||
const resetDestinationStream = async (
|
const resetDestinationStream = async (
|
||||||
fileDownloadPath: string
|
fileDownloadPath: string
|
||||||
): Promise<void> => {
|
): Promise<void> => {
|
||||||
|
destinationStream.close()
|
||||||
await rmFile(fileDownloadPath)
|
await rmFile(fileDownloadPath)
|
||||||
destinationStream = fs.createWriteStream(fileDownloadPath)
|
destinationStream = fs.createWriteStream(fileDownloadPath)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user