We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af7d664 commit fd0a554Copy full SHA for fd0a554
crates/lib/src/install.rs
@@ -2126,13 +2126,9 @@ pub(crate) fn write_composefs_state(
2126
std::fs::create_dir_all(COMPOSEFS_TRANSIENT_STATE_DIR)
2127
.with_context(|| format!("Creating {COMPOSEFS_TRANSIENT_STATE_DIR}"))?;
2128
2129
- let mut file = std::fs::OpenOptions::new()
2130
- .write(true)
2131
- .create(true)
2132
- .open(COMPOSEFS_STAGED_DEPLOYMENT_PATH)
2133
- .context("Opening staged-deployment file")?;
2134
-
2135
- file.write_all(deployment_id.to_hex().as_bytes())?;
+ let buf = deployment_id.to_hex();
+ std::fs::write(COMPOSEFS_STAGED_DEPLOYMENT_PATH, buf)
+ .with_context(|| format!("Writing {COMPOSEFS_STAGED_DEPLOYMENT_PATH}"))?;
2136
}
2137
2138
Ok(())
0 commit comments