feat: use --gitfile

This commit is contained in:
莘权 马 2024-03-21 15:14:14 +08:00
parent 6f4d30825f
commit 9cfcfb1ea8
2 changed files with 2 additions and 2 deletions

View file

@ -130,7 +130,7 @@ def _add_line(rows: List[str]) -> List[str]:
def _execute_tree(root: Path, gitignore: str | Path) -> str:
args = ["--gitignore", str(gitignore)] if gitignore else []
args = ["--gitfile", str(gitignore)] if gitignore else []
try:
result = subprocess.run(["tree"] + args + [str(root)], capture_output=True, text=True, check=True)
if result.returncode != 0: