CLI: Rework submodule checking (#9162)
This commit is contained in:
parent
5246acb2e4
commit
179e5c018f
@ -24,7 +24,6 @@ ESSENTIAL_BINARIES = {
|
|||||||
},
|
},
|
||||||
'bin/qmk': {},
|
'bin/qmk': {},
|
||||||
}
|
}
|
||||||
ESSENTIAL_SUBMODULES = ['lib/chibios', 'lib/lufa']
|
|
||||||
|
|
||||||
|
|
||||||
def _udev_rule(vid, pid=None, *args):
|
def _udev_rule(vid, pid=None, *args):
|
||||||
@ -124,17 +123,11 @@ def check_submodules():
|
|||||||
|
|
||||||
for submodule in submodules.status().values():
|
for submodule in submodules.status().values():
|
||||||
if submodule['status'] is None:
|
if submodule['status'] is None:
|
||||||
if submodule['name'] in ESSENTIAL_SUBMODULES:
|
|
||||||
cli.log.error('Submodule %s has not yet been cloned!', submodule['name'])
|
cli.log.error('Submodule %s has not yet been cloned!', submodule['name'])
|
||||||
ok = False
|
ok = False
|
||||||
else:
|
|
||||||
cli.log.warn('Submodule %s is not available.', submodule['name'])
|
|
||||||
elif not submodule['status']:
|
elif not submodule['status']:
|
||||||
if submodule['name'] in ESSENTIAL_SUBMODULES:
|
|
||||||
cli.log.error('Submodule %s is not up to date!', submodule['name'])
|
cli.log.error('Submodule %s is not up to date!', submodule['name'])
|
||||||
ok = False
|
ok = False
|
||||||
else:
|
|
||||||
cli.log.warn('Submodule %s is not up to date!', submodule['name'])
|
|
||||||
|
|
||||||
return ok
|
return ok
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user