src: add sync before umount

This commit is contained in:
Aditya Maru 2025-01-21 19:34:23 -05:00
commit 2331ad873b
3 changed files with 4 additions and 2 deletions

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++) {