fix: warn on credential file permission failures instead of ignoring (#124)

Replaced silent `let _ =` on set_permissions calls in save_encrypted
with eprintln! warnings so users are aware if their credential files
end up with insecure permissions. Also log keyring access failures
instead of silently falling through to file storage.
This commit is contained in:
Joe Eftekhari
2026-03-05 12:50:55 -10:00
committed by GitHub
parent 9a780d73d4
commit 132c3b19a7
2 changed files with 13 additions and 1 deletions
@@ -0,0 +1,10 @@
---
"@googleworkspace/cli": patch
---
fix: warn on credential file permission failures instead of ignoring
Replaced silent `let _ =` on `set_permissions` calls in `save_encrypted`
with `eprintln!` warnings so users are aware if their credential files
end up with insecure permissions. Also log keyring access failures
instead of silently falling through to file storage.
+3 -1
View File
@@ -119,7 +119,9 @@ fn get_or_create_key() -> anyhow::Result<[u8; 32]> {
return Ok(cache_key(key));
}
Err(_) => {} // Fallthrough to file storage
Err(e) => {
eprintln!("Warning: keyring access failed, falling back to file storage: {e}");
}
}
}