Relocate CLI git interactions (#16682)
This commit is contained in:
parent
e5823b5650
commit
ed773ab73c
6 changed files with 118 additions and 122 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue