mirror of
https://github.com/googleworkspace/cli.git
synced 2026-09-14 16:47:13 +08:00
5872dbe474
Previously, get_or_create_key() unconditionally wrote the encryption key to ~/.config/gws/.encryption_key on first run, even when the OS keyring was available. This left the key material on disk as a plain file, making credentials portable by copying the config directory. Changes: - Extract save_key_file() helper to deduplicate file-writing logic - On keyring read success: delete stale .encryption_key (migration) - On NoEntry + existing file: migrate key into keyring, then delete file - On NoEntry + new key: try keyring first, only write file as fallback Fixes #344 Co-authored-by: jpoehnelt-bot <jpoehnelt-bot@users.noreply.github.com>