Skip to content

Commit 7d4888c

Browse files
Merge pull request #111 from Sebastian-Webster/108-lock-acquisition-fails-after-a-binary-download-failure
Fix lock acquisition failure
2 parents e4ed89c + 5540a31 commit 7d4888c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libraries/Downloader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ export function downloadBinary(binaryInfo: BinaryInfo, options: InternalServerOp
164164

165165
if (options.downloadBinaryOnce) {
166166
const extractedPath = `${dirpath}/${version}`
167-
await fsPromises.mkdir(extractedPath, {recursive: true})
168167

169168
const binaryPath = normalizePath(`${extractedPath}/mysql/bin/mysqld${process.platform === 'win32' ? '.exe' : ''}`)
170169
const archivePath = `${dirpath}/${version}.${fileExtension}`
@@ -179,6 +178,7 @@ export function downloadBinary(binaryInfo: BinaryInfo, options: InternalServerOp
179178

180179
while (true) {
181180
try {
181+
await fsPromises.mkdir(extractedPath, {recursive: true})
182182
releaseFunction = lockSync(extractedPath)
183183
break
184184
} catch (e) {

0 commit comments

Comments
 (0)