mirror of
https://github.com/qmk/qmk_cli.git
synced 2026-07-25 16:42:55 -04:00
Protect against empty QMK_HOME folder
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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!')
|
||||
|
||||
Reference in New Issue
Block a user