1
0
Fork 0

Port new_keyboard.sh to CLI (#13706)

Co-authored-by: Erovia <Erovia@users.noreply.github.com>
This commit is contained in:
Ryan 2021-07-31 06:57:40 +10:00 committed by GitHub
parent 770a525425
commit b021c2f2c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 208 additions and 56 deletions

View file

@ -240,6 +240,15 @@ def parse_configurator_json(configurator_file):
return user_keymap
def git_get_username():
"""Retrieves user's username from Git config, if set.
"""
git_username = cli.run(['git', 'config', '--get', 'user.name'])
if git_username.returncode == 0 and git_username.stdout:
return git_username.stdout.strip()
def git_check_repo():
"""Checks that the .git directory exists inside QMK_HOME.