Merge pull request #96 from useblacksmith/add-sync

src: add sync before umount
This commit is contained in:
Aditya Maru 2025-01-21 19:38:26 -05:00 committed by GitHub
commit 6ff8522817
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 2 deletions

2
dist/index.js generated vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -378,6 +378,8 @@ actionsToolkit.run(
}
}
try {
// Run sync to flush any pending writes before unmounting.
await execAsync('sync');
const {stdout: mountOutput} = await execAsync(`mount | grep ${mountPoint}`);
if (mountOutput) {
for (let attempt = 1; attempt <= 3; attempt++) {