1
0
Fork 0

Relocate CLI git interactions (#16682)

This commit is contained in:
Joel Challis 2022-03-18 16:02:24 +00:00 committed by GitHub
parent e5823b5650
commit ed773ab73c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 118 additions and 122 deletions

View file

@ -7,7 +7,6 @@ from subprocess import DEVNULL
from milc import cli
from qmk import submodules
from qmk.constants import QMK_FIRMWARE
class CheckStatus(Enum):
@ -150,14 +149,3 @@ def is_executable(command):
cli.log.error("{fg_red}Can't run `%s %s`", command, version_arg)
return False
def check_git_repo():
"""Checks that the .git directory exists inside QMK_HOME.
This is a decent enough indicator that the qmk_firmware directory is a
proper Git repository, rather than a .zip download from GitHub.
"""
dot_git = QMK_FIRMWARE / '.git'
return CheckStatus.OK if dot_git.exists() else CheckStatus.WARNING