-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Dont exit silently when storing api key fails #5260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| .interact()? | ||
| { | ||
| if key.secret { | ||
| config.set_secret(&key.name, Value::String(env_value))?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this already returns an error, so I looked at why we'd want to turn that into a Ok(false), and it's because we throw it away here:
goose/crates/goose-cli/src/cli.rs
Line 781 in 1b532cc
| let _ = handle_configure().await; |
I think a better fix would be to just not throw it away there, no?
| cliclack::outro(style(format!( | ||
| "Failed to store {} securely: {}. Please ensure your system's secure storage is accessible. Alternatively you can run with GOOSE_DISABLE_KEYRING=true or set the key in your environment variables", | ||
| key_name, e | ||
| )).on_red().white())?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still feels like this should be an Err and the function should return Result<(), Box> but this is still an improvement, and fixing that might mean more tinkering with the callers than you had hoped
|
Nice! Thanks! |
* main: (30 commits) feat: add goose powered ai culinary innovation studio prompt to library (#5423) removing golang/temporal building testing tetrate with sonnet (#5428) Add Recipes Test Script (#5420) Don't die on strange chars (#5415) fix: allow subagent to run in parent --no-session mode (#5384) docs: analyze tool (#5418) fix: gracefully close goosed listening port (#5321) move history txt to state dir (#5410) Dont exit silently when storing api key fails (#5260) Make reply use the API (#5389) Fix/icon ii (#5413) Enable runtime access to provider name (#5399) fix: ensure trailing newline in files created by `text_editor` tool (#5336) docs: September 2025 Community All-Stars (#5411) make supports_cache_control async to avoid block in place (#5362) Send all the logs we output (#5363) Recipe variables (#5365) Feat/add mermaid chart rendering (#5377) Set up Datadog metrics for prompt injection detection (#5385) ...
Co-authored-by: Douwe Osinga <[email protected]> Signed-off-by: Blair Allan <[email protected]>
Mostly for linux; key storage doesn't work and we silently exit.
fixes: #5137
fixes: #2472