handle the case where qmk_firmware exists but isn't a clone

This commit is contained in:
Zach White
2021-03-27 08:46:22 -07:00
committed by Zach White
parent c6e736adc7
commit 504291bbf5
+9
View File
@@ -83,6 +83,15 @@ def setup(cli):
if is_qmk_firmware(cli.args.home):
cli.log.info('Found qmk_firmware at %s.', str(cli.args.home))
elif qmk_firmware.exists():
path_str = str(qmk_firmware)
if qmk_firmware.name != 'qmk_firmware':
cli.log.warning('Warning: %s does not end in "qmk_firmware". Did you mean to use "--home %s/qmk_firmware"?' % (path_str, path_str))
cli.log.error("Path '%s' exists but is not a qmk_firmware clone!", path_str)
exit(1)
else:
cli.log.error('Could not find qmk_firmware!')
if yesno(clone_prompt):