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.
This commit is contained in:
parent
38f14c4174
commit
8fe5c718b4
9
bin/qmk
9
bin/qmk
@ -4,7 +4,6 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from importlib.util import find_spec
|
from importlib.util import find_spec
|
||||||
from time import strftime
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
# Add the QMK python libs to our path
|
# Add the QMK python libs to our path
|
||||||
@ -52,9 +51,11 @@ import milc # noqa
|
|||||||
|
|
||||||
# For developers additional modules are needed
|
# For developers additional modules are needed
|
||||||
if milc.cli.config.user.developer:
|
if milc.cli.config.user.developer:
|
||||||
developer = True
|
# Do not run the check for 'config',
|
||||||
_check_modules('requirements-dev.txt')
|
# 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}'
|
milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}Ψ{style_reset_all}'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user