Skip to content

Commit

Permalink
check if the download-lock file exists before doing unlink
Browse files Browse the repository at this point in the history
  • Loading branch information
Jolg42 committed Mar 18, 2020
1 parent 9be5dad commit 9afe7e6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cli/prisma2/scripts/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ function createLockFile() {
function cleanupLockFile() {
if (createdLockFile) {
try {
fs.unlinkSync(lockFile)
if (fs.existsSync(lockFile)) {
fs.unlinkSync(lockFile)
}
} catch (e) {
debug(e)
}
Expand Down

0 comments on commit 9afe7e6

Please sign in to comment.