fix(notfiles): save state on partial link failure; skip re-copy of unchanged files

Closes #8, closes #9
This commit is contained in:
Joseph O'Brien
2026-04-11 23:40:32 -04:00
parent 11d329c5a2
commit 3e7135a398
11 changed files with 156 additions and 44 deletions

View File

@@ -50,15 +50,19 @@ impl BitwardenSource {
source: anyhow::anyhow!("bw unlock spawn: {e}"),
})?;
if let Some(mut stdin) = child.stdin.take() {
stdin.write_all(password.as_bytes()).map_err(|e| AgeError::SourceError {
name: self.name().to_string(),
source: anyhow::anyhow!("bw unlock stdin write: {e}"),
})?;
stdin
.write_all(password.as_bytes())
.map_err(|e| AgeError::SourceError {
name: self.name().to_string(),
source: anyhow::anyhow!("bw unlock stdin write: {e}"),
})?;
}
let output = child.wait_with_output().map_err(|e| AgeError::SourceError {
name: self.name().to_string(),
source: anyhow::anyhow!("bw unlock wait: {e}"),
})?;
let output = child
.wait_with_output()
.map_err(|e| AgeError::SourceError {
name: self.name().to_string(),
source: anyhow::anyhow!("bw unlock wait: {e}"),
})?;
if !output.status.success() {
return Err(AgeError::SourceError {
name: self.name().to_string(),