alexpasmantier / television

The revolution will (not) be televised
https://crates.io/crates/television
MIT License
126 stars 4 forks source link

[Windows]: Channel `git-repos` doesn't seem to work properly #24

Open JustBarnt opened 1 day ago

JustBarnt commented 1 day ago

Description When running tv git-repos it only picks up very few repos. As seen in the screenshot. I know on my C:/ alone I have way more than whats there, not to mention when I run tv git-repos on my D:/ it produces the same results. I don't think it is scanning properly on windows.

On my C:/ alone I have repositories for C:\users\<username>\.config\ which houses all my TUI related configs like you'd see on a unix machine, I have my nvim configuration as well, and all the nvim-data/lazyvim items as well that get git cloned, which also are not getting picked up.

This ends up being what gets scanned. image

Example

  1. Install television as instructed.
  2. Run tv git-repos

Expected behavior Television should pick up all git repositories on the filesystem.

Actual behavior Television is returning very few directories.

Environment

Additional context It also may be good to be able to include a list of directories to ignore when searching instead of it just showing all based of the README description of git-repos?

JustBarnt commented 1 day ago

I know absolutely no rust, but because I like to learn, I was reading through the git-repos.rs file. I found this line

I think when the channel is created looks like it only runs through the BaseDirs.home_dir() results which according to what I can find is only is C:\Users\<username>. Would this be a cause where it would be better to have a configurable list of directories we can setup in the config.toml file instead?

I am compleletly wrong please let me know. Like I said I have no rust experience just using this to try and learn and be helpful! 🤣

alexpasmantier commented 1 day ago

Your help is very much welcome since it's difficult for me to get my hands on a windows machine and debug these right now.

Adding custom base paths from the config for the git-repos channel does sound like the way to go 👍🏻

I'm wondering if your git-repos not being found might be a cause of the crawler ignoring hidden directories (which might mean repos in your .config folder for instance might never be inspected).

Will check that out ASAP.

JustBarnt commented 1 day ago

@alexpasmantier Yeah I suspected that is the issue, once I did some lookup on the documentation for BaseDirs.home_dir() in rust and say that it was only the C:/Users/<username> drive and then it was already pushing folders like .config, appdata, etc to be hidden.

But thank you for being so quick on these!