mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 18:25:00 +00:00
Handle missing api key without exception #559
This commit is contained in:
parent
9b2e697584
commit
7699866802
1 changed files with 3 additions and 1 deletions
|
@ -544,7 +544,9 @@ def main(argv=None, input=None, output=None, force_git_root=None):
|
|||
|
||||
def scrub_sensitive_info(text):
|
||||
# Replace sensitive information with placeholder
|
||||
return text.replace(args.openai_api_key, "***")
|
||||
if text and args.openai_api_key:
|
||||
return text.replace(args.openai_api_key, "***")
|
||||
return text
|
||||
|
||||
if args.verbose:
|
||||
show = scrub_sensitive_info(parser.format_values())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue