diff options
author | Erovia <erovia@users.noreply.github.com> | 2020-04-05 11:17:12 +0200 |
---|---|---|
committer | skullydazed <skullydazed@users.noreply.github.com> | 2020-04-08 09:31:14 -0700 |
commit | 8fe5c718b499fb1a19bc5b49c5c91a6fc21d2477 (patch) | |
tree | 5a5a57afa4553d8a81c3136d00c9e08d1d9202e5 | |
parent | 38f14c4174afe7c576e8bd032f18b1dcceaf9c77 (diff) | |
download | qmk_firmware-8fe5c718b499fb1a19bc5b49c5c91a6fc21d2477.tar.gz qmk_firmware-8fe5c718b499fb1a19bc5b49c5c91a6fc21d2477.zip |
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 @@ | |||
4 | import os | 4 | import os |
5 | import sys | 5 | import sys |
6 | from importlib.util import find_spec | 6 | from importlib.util import find_spec |
7 | from time import strftime | ||
8 | from pathlib import Path | 7 | from pathlib import Path |
9 | 8 | ||
10 | # Add the QMK python libs to our path | 9 | # Add the QMK python libs to our path |
@@ -52,9 +51,11 @@ import milc # noqa | |||
52 | 51 | ||
53 | # For developers additional modules are needed | 52 | # For developers additional modules are needed |
54 | if milc.cli.config.user.developer: | 53 | if milc.cli.config.user.developer: |
55 | developer = True | 54 | # Do not run the check for 'config', |
56 | _check_modules('requirements-dev.txt') | 55 | # so users can turn off developer mode |
57 | 56 | if len(sys.argv) == 1 or (len(sys.argv) > 1 and 'config' != sys.argv[1]): | |
57 | developer = True | ||
58 | _check_modules('requirements-dev.txt') | ||
58 | 59 | ||
59 | milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}Ψ{style_reset_all}' | 60 | milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}Ψ{style_reset_all}' |
60 | 61 | ||