We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c8de875 commit 5cc9d68Copy full SHA for 5cc9d68
asyncgit/src/sync/sign.rs
@@ -323,7 +323,13 @@ impl Sign for SSHSign {
323
.wait_with_output()
324
.map_err(|e| SignError::Output(e.to_string()))?;
325
326
- //TODO: cleanup temp file if created
+ let tmp_path = std::env::temp_dir();
327
+ if self.signing_key.starts_with(tmp_path) {
328
+ // Not handling error, as its not that bad. OS maintenance tasks will take care of it at a later point.
329
+ let _ = std::fs::remove_file(PathBuf::from(
330
+ &self.signing_key,
331
+ ));
332
+ }
333
334
if !output.status.success() {
335
return Err(SignError::Shellout(format!(
0 commit comments