Skip to content

Commit

Permalink
refactor: use async unlink (#1480)
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk authored Jun 23, 2022
1 parent b068183 commit 2fccc87
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lambda/handler-runner/docker-runner/DockerContainer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createHash } from 'node:crypto'
import { createWriteStream, unlinkSync } from 'node:fs'
import { readFile, writeFile } from 'node:fs/promises'
import { createWriteStream } from 'node:fs'
import { readFile, unlink, writeFile } from 'node:fs/promises'
import { platform } from 'node:os'
import { dirname, join, sep } from 'node:path'
import { log, progress } from '@serverless/utils/log.js'
Expand Down Expand Up @@ -327,7 +327,7 @@ export default class DockerContainer {

log.verbose(`[${layerName}] Removing zip file`)

unlinkSync(layerZipFile)
await unlink(layerZipFile)
} finally {
layerProgress.remove()
}
Expand Down

0 comments on commit 2fccc87

Please sign in to comment.