Dont exit silently when storing api key fails#5260
Merged
Conversation
jamadeo
reviewed
Oct 23, 2025
| .interact()? | ||
| { | ||
| if key.secret { | ||
| config.set_secret(&key.name, Value::String(env_value))?; |
Collaborator
There was a problem hiding this comment.
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
I think a better fix would be to just not throw it away there, no?
jamadeo
approved these changes
Oct 28, 2025
| 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())?; |
Collaborator
There was a problem hiding this comment.
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! |
michaelneale
added a commit
that referenced
this pull request
Oct 29, 2025
* 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) ...
BlairAllan
pushed a commit
to BlairAllan/goose
that referenced
this pull request
Nov 29, 2025
Co-authored-by: Douwe Osinga <douwe@squareup.com> Signed-off-by: Blair Allan <Blairallan@icloud.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mostly for linux; key storage doesn't work and we silently exit.
fixes: #5137
fixes: #2472