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:
@@ -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.
|
||||
@@ -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}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user