Protect against empty QMK_HOME folder

This commit is contained in:
zvecr
2020-03-26 23:39:54 +00:00
committed by skullydazed
parent 73c903b8b6
commit ab7d0c6e46
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ def main():
# Import the subcommand modules
import qmk_cli.subcommands
if qmk_firmware.exists():
if qmk_firmware.exists() and os.listdir(qmk_firmware):
os.chdir(str(qmk_firmware))
sys.path.append(str(qmk_firmware / 'lib' / 'python'))
import qmk.cli
+1 -1
View File
@@ -30,7 +30,7 @@ def setup(cli):
exit(1)
# Check on qmk_firmware, and if it doesn't exist offer to check it out.
if qmk_firmware.exists():
if qmk_firmware.exists() and os.listdir(qmk_firmware):
cli.log.info('Found qmk_firmware at %s.', str(qmk_firmware))
else:
cli.log.error('qmk_firmware not found!')