Skip to content

Commit

Permalink
Merge pull request #96 from useblacksmith/add-sync
Browse files Browse the repository at this point in the history
src: add sync before umount
  • Loading branch information
adityamaru authored Jan 22, 2025
2 parents 75e9b3f + 2331ad8 commit 6ff8522
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down

0 comments on commit 6ff8522

Please sign in to comment.