Skip to content

Commit 88d4619

Browse files
authored
Merge pull request #256 from gd4Ark/main
typo: release lockfile
2 parents fa1c4f6 + e7725f9 commit 88d4619

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/core/src/files.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,12 @@ export async function writeFileWithLock(path: string, content: string, retry = 3
108108
return
109109
}
110110

111-
let relase: () => Promise<void> | undefined
111+
let release: () => Promise<void> | undefined
112112

113113
try {
114114
try {
115115
// 获取文件锁
116-
relase = await lockfile.lock(path, { realpath: false })
116+
release = await lockfile.lock(path, { realpath: false })
117117
}
118118
catch {
119119
// 获取文件锁失败
@@ -125,8 +125,8 @@ export async function writeFileWithLock(path: string, content: string, retry = 3
125125
finally {
126126
// eslint-disable-next-line ts/ban-ts-comment
127127
// @ts-expect-error'
128-
if (relase) {
129-
await relase() // 释放文件锁
128+
if (release) {
129+
await release() // 释放文件锁
130130
}
131131
}
132132
}

0 commit comments

Comments
 (0)