Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixup! avm: force file sync (#1457) #1460

Merged
merged 1 commit into from Feb 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions avm/src/lib.rs
Expand Up @@ -281,6 +281,9 @@ mod tests {
let mut current_version_file =
fs::File::create(current_version_file_path().as_path()).unwrap();
current_version_file.write_all("0.18.2".as_bytes()).unwrap();
// Sync the file to disk before the read in current_version() to
// mitigate the read not seeing the written version bytes.
current_version_file.sync_all().unwrap();
// Create a fake binary for anchor-0.18.2 in the bin directory
fs::File::create(version_binary_path(&version)).unwrap();
uninstall_version(&version).unwrap();
Expand Down