This commit is contained in:
Paul Gauthier 2024-08-30 06:55:50 -07:00
parent 7a72c80605
commit c67699a154

View file

@ -53,9 +53,15 @@ def guessed_wrong_repo(io, git_root, fnames, git_dname):
def make_new_repo(git_root, io):
repo = git.Repo.init(git_root)
try:
repo = git.Repo.init(git_root)
check_gitignore(git_root, io, False)
except git.exc.GitCommandError as err: # issue #1233
io.tool_error(f"Unable to create git repo in {git_root}")
io.tool_error(str(err))
return
io.tool_output(f"Git repository created in {git_root}")
check_gitignore(git_root, io, False)
return repo