mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-03 15:33:13 +03:00
🔨 chore: improve error handling when writing alternates file
This commit is contained in:
parent
e3d8b850b6
commit
a76ff7b988
@ -49,7 +49,9 @@ impl Repository {
|
||||
|
||||
let alternatives_file = self.0.path().join("objects/info/alternates");
|
||||
|
||||
std::fs::write(alternatives_file, format!("{path}\n"))?;
|
||||
if let Err(error) = std::fs::write(&alternatives_file, format!("{path}\n")) {
|
||||
tracing::warn!(?error, path = %alternatives_file.display(), "failed to write alternates file");
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user