diff --git a/libs/gl-cli/src/util.rs b/libs/gl-cli/src/util.rs index 1362ffb64..6d11c24b8 100644 --- a/libs/gl-cli/src/util.rs +++ b/libs/gl-cli/src/util.rs @@ -34,6 +34,7 @@ pub fn write_seed(file_path: impl AsRef, seed: impl AsRef<[u8]>) -> Result let mut file = File::create(file_path)?; file.write_all(seed.as_ref())?; + file.sync_all()?; Ok(()) } @@ -43,6 +44,7 @@ pub fn write_seed(file_path: impl AsRef, seed: impl AsRef<[u8]>) -> Result pub fn write_credentials(file_path: impl AsRef, creds: impl AsRef<[u8]>) -> Result<()> { let mut file = File::create(&file_path)?; file.write_all(creds.as_ref())?; + file.sync_all()?; Ok(()) }