Merge pull request #327878 from teto/warn-when-missing-token

pluginupdate: warn when github token isn't set
This commit is contained in:
Thiago Kenji Okada 2024-08-11 11:40:07 +01:00 committed by GitHub
commit 5b60c5736f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -791,6 +791,11 @@ def update_plugins(editor: Editor, args):
All input arguments are grouped in the `Editor`."""
log.info("Start updating plugins")
if args.proc > 1 and args.github_token == None:
log.warning("You have enabled parallel updates but haven't set a github token.\n"
"You may be hit with `HTTP Error 429: too many requests` as a consequence."
"Either set --proc=1 or --github-token=YOUR_TOKEN. ")
fetch_config = FetchConfig(args.proc, args.github_token)
update = editor.get_update(args.input_file, args.outfile, fetch_config)