Zac-HD / shed

`shed` canonicalises Python code. Shed your legacy, stop bikeshedding, and move on. Black++
https://pypi.org/project/shed/
GNU Affero General Public License v3.0
342 stars 23 forks source link

Positional file argument does not prevent git repo detection #28

Closed lmmx closed 2 years ago

lmmx commented 2 years ago

I know this is closed but I don't think it's working as intended:

$ shed ./box_resize.py 
fatal: not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

When passed in a positional file argument on the command line it is resorting to the git approach. This seems like a bug, as the README says it can be used without a git repo, thought I should let you know

Zac-HD commented 2 years ago

Ah, we still try to find a git repo to determine first-party imports - I'd bet shed exits cleanly because the error is handled, we just need to avoid git writing to stdout or stderr.

lmmx commented 2 years ago

Brill, cheers that fixes it! :rocket::rocket::rocket: