mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 06:05:24 +00:00
fix: retry dmg detach in macOS sharp check
This commit is contained in:
1 parent
a65b4a5d48
commit
b691d4f7cb
1 file changed
+12
-2
@@ -137,9 +137,19 @@ function verifyArtifact(artifact) {
|
|||||||
console.log(`Verified macOS sharp packaging: ${path.basename(artifact)}`);
|
console.log(`Verified macOS sharp packaging: ${path.basename(artifact)}`);
|
||||||
} finally {
|
} finally {
|
||||||
if (mountedAt) {
|
if (mountedAt) {
|
||||||
spawnSync("hdiutil", ["detach", mountedAt], { stdio: "ignore" });
|
for (let attempt = 0; attempt < 5; attempt++) {
|
||||||
|
const args =
|
||||||
|
attempt < 3 ? ["detach", mountedAt] : ["detach", "-force", mountedAt];
|
||||||
|
if (spawnSync("hdiutil", args, { stdio: "ignore" }).status === 0) break;
|
||||||
|
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, 2000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fs.rmSync(temporaryRoot, { recursive: true, force: true });
|
fs.rmSync(temporaryRoot, {
|
||||||
|
recursive: true,
|
||||||
|
force: true,
|
||||||
|
maxRetries: 5,
|
||||||
|
retryDelay: 1000,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user