fix: wait for lock file handle release before installation

This commit is contained in:
sw3205933776 2025-08-22 10:01:16 +08:00
parent bd8632cbbe
commit e425afa592
2 changed files with 4 additions and 0 deletions

View file

@ -158,6 +158,8 @@ async function installBun() {
const isInstalled = await downloadBunBinary(BUN_RELEASE_BASE_URL,platform, arch, version, isMusl, isBaseline)
if(!isInstalled){
// Wait for the file lock handle to be released
await new Promise(r => setTimeout(r, 200))
console.log('Downloading bun from gitcode.com')
await downloadBunBinary('https://gitcode.com/CherryHQ/bun/releases/download',platform, arch, version, isMusl, isBaseline)
}

View file

@ -192,6 +192,8 @@ async function installUv() {
isMusl
);
if (!isInstalled) {
// Wait for the file lock handle to be released
await new Promise(r => setTimeout(r, 200))
console.log("Downloading uv from gitcode.com");
isInstalled = await downloadUvBinary(
"https://gitcode.com/CherryHQ/uv/releases/download",