This commit is contained in:
Paul Gauthier 2023-07-22 08:56:40 -03:00
parent 4e40c8ac15
commit 3ac98b3261

View file

@ -31,7 +31,7 @@ def setup_git(git_root, io):
check_gitignore(git_root, io, False) check_gitignore(git_root, io, False)
repo = git.Repo.init(Path.cwd()) repo = git.Repo.init(git_root)
global_git_config = git.GitConfigParser([str(Path.home() / ".gitconfig")], read_only=True) global_git_config = git.GitConfigParser([str(Path.home() / ".gitconfig")], read_only=True)
with repo.config_writer() as git_config: with repo.config_writer() as git_config:
if not global_git_config.has_option("user", "name"): if not global_git_config.has_option("user", "name"):
@ -43,7 +43,7 @@ def setup_git(git_root, io):
io.tool_output("Git repository created in the current working directory.") io.tool_output("Git repository created in the current working directory.")
return git_root return repo.working_tree_dir
def check_gitignore(git_root, io, ask=True): def check_gitignore(git_root, io, ask=True):