You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
~/tmp$ python3 -m venv venv
~/tmp$ source venv/bin/activate
(venv) ~/tmp$ pip install isort==5.2.2
Collecting isort==5.2.2
Using cached isort-5.2.2-py3-none-any.whl (90 kB)
Installing collected packages: isort
Successfully installed isort-5.2.2
(venv) ~/tmp$ mkdir isort_test
(venv) ~/tmp$ cd isort_test/
(venv) ~/tmp/isort_test$ git init
Initialized empty Git repository in /Users/peter/tmp/isort_test/.git/
(venv) ~/tmp/isort_test$ isort --check --skip foo.py --gitignore .
fatal: this operation must be run in a work tree
fatal: this operation must be run in a work tree
fatal: this operation must be run in a work tree
fatal: this operation must be run in a work tree
fatal: this operation must be run in a work tree
fatal: this operation must be run in a work tree
fatal: this operation must be run in a work tree
Note that adding a .gitignore or the foo.py file does not silence the errors, however isort --check --skip foo.py --skip .git --gitignore . does.
The text was updated successfully, but these errors were encountered:
Thanks for reporting! This is fixed in develop and will make its way out in the 5.3.0 release. In the meantime you can also fix it by adding a --skip .git to your command.
To reproduce:
Note that adding a
.gitignore
or thefoo.py
file does not silence the errors, howeverisort --check --skip foo.py --skip .git --gitignore .
does.The text was updated successfully, but these errors were encountered: