fix(secrets): allow empty GOG_KEYRING_PASSWORD to skip prompt#153
fix(secrets): allow empty GOG_KEYRING_PASSWORD to skip prompt#153tonimelisma wants to merge 1 commit intoopenclaw:mainfrom
Conversation
Previously, setting GOG_KEYRING_PASSWORD="" would still trigger the interactive password prompt because os.Getenv returns empty string for both "not set" and "set to empty". Use os.LookupEnv to distinguish between these cases, allowing users to explicitly set an empty password to skip the prompt. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
I'm trying to use gog with openclaw. The agent runs without a TTY, and I don't have gnome-keyring or kwallet installed on my system. Currently this fails because:
Error from OpenClaw: This fix allows setting GOG_KEYRING_PASSWORD="" to explicitly use an empty passphrase, enabling non-interactive use of the file backend without requiring a system keyring. |
- fix: Go version in go.mod (PR openclaw#158) - fix(secrets): allow empty GOG_KEYRING_PASSWORD to skip prompt (PR openclaw#153) - fix(auth): add gmail readonly scope and fix drive readonly accumulation (PR openclaw#113) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Thanks. This is already on Current Keeping the newer landed fix avoids duplicate history. |
Summary
os.LookupEnvinstead ofos.Getenvto detect whenGOG_KEYRING_PASSWORDis explicitly set to an empty stringGOG_KEYRING_PASSWORD=""Problem
Previously, setting
GOG_KEYRING_PASSWORD=""would still trigger the interactive password prompt becauseos.Getenvreturns an empty string for both "not set" and "set to empty".Solution
Use
os.LookupEnvwhich returns(value, isSet), allowing us to distinguish between:Test plan
GOG_KEYRING_PASSWORD=""and verify no prompt appearsGOG_KEYRING_PASSWORDand verify prompt still appearsGOG_KEYRING_PASSWORD="somepass"and verify no prompt appears🤖 Generated with Claude Code