diff options
author | Erovia <erovia@users.noreply.github.com> | 2020-04-05 11:17:12 +0200 |
---|---|---|
committer | Florian Didron <fdidron@users.noreply.github.com> | 2020-06-12 17:00:27 +0900 |
commit | 4f5c76bfbefe0141858ec7eec15f790318c2e477 (patch) | |
tree | dcf6fc99888b54648ec1186d9d6c925a7c57f642 | |
parent | dcad31810562e2767dea56d183d329475dcaf413 (diff) |
Fix edge-case with config
Without this check, users can lock themselves out by enabling developer
mode, than disabling the dependencies. They wouldn't be able to turn off
developer mode as none of the subcommands (including 'config') would
work.
-rwxr-xr-x | bin/qmk | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -4,7 +4,6 @@ import os import sys from importlib.util import find_spec -from time import strftime from pathlib import Path # Add the QMK python libs to our path @@ -52,9 +51,11 @@ import milc # noqa # For developers additional modules are needed if milc.cli.config.user.developer: - developer = True - _check_modules('requirements-dev.txt') - + # Do not run the check for 'config', + # so users can turn off developer mode + if len(sys.argv) == 1 or (len(sys.argv) > 1 and 'config' != sys.argv[1]): + developer = True + _check_modules('requirements-dev.txt') milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}Ψ{style_reset_all}' |