-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Since I wasn't able to get any output on Windows, I had to modify the run_tree_command
function as follows to make it work:
import platform
def run_tree_command(path: str) -> str:
"""Run the tree command and return its output."""
if platform.system() == "Windows":
cmd = ["cmd", "/c", "tree", "/a", "/f", path]
else:
cmd = ["tree", "-a", "-f", "--noreport", path]
result = subprocess.run(
cmd,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
check=True
)
return result.stdout
I'm not sure if the issue is on my end, so I'm just leaving this here!
Thanks!
c3us-dev and Dio-Liu
Metadata
Metadata
Assignees
Labels
No labels