qmk doctor - Handle timeouts while checking binaries (#19549)

This commit is contained in:
Joel Challis 2023-01-09 09:27:41 +00:00 committed by GitHub
parent a3ed1b0c8d
commit b57714f793
Failed to generate hash of commit
2 changed files with 46 additions and 33 deletions

View file

@ -119,13 +119,15 @@ def doctor(cli):
# Make sure the basic CLI tools we need are available and can be executed.
bin_ok = check_binaries()
if not bin_ok:
if bin_ok == CheckStatus.ERROR:
if yesno('Would you like to install dependencies?', default=True):
cli.run(['util/qmk_install.sh', '-y'], stdin=DEVNULL, capture_output=False)
bin_ok = check_binaries()
if bin_ok:
if bin_ok == CheckStatus.OK:
cli.log.info('All dependencies are installed.')
elif bin_ok == CheckStatus.WARNING:
cli.log.warning('Issues encountered while checking dependencies.')
else:
status = CheckStatus.ERROR