From 3126bdb90a5c93751eab1dba2713cf328920263f Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 2 Jan 2023 03:31:01 +0000 Subject: [PATCH] Also handle clone too --- qmk_cli/subcommands/clone.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qmk_cli/subcommands/clone.py b/qmk_cli/subcommands/clone.py index ae1140a..b1f4912 100644 --- a/qmk_cli/subcommands/clone.py +++ b/qmk_cli/subcommands/clone.py @@ -23,7 +23,8 @@ def clone(cli): qmk_firmware = Path(cli.args.destination) git_url = '/'.join((cli.args.baseurl, cli.args.fork)) - if qmk_firmware.exists(): + # Exists (but not an empty dir) + if qmk_firmware.exists() and any(qmk_firmware.iterdir()): cli.log.error('Destination already exists: %s', cli.args.destination) exit(1)