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
cd /tmp
mkdir dunk-submodule-fail
cd dunk-submodule-fail
git init
mkdir this-is-submodule
cd this-is-submodule
git init
echo"test"> myfile.txt && git add --all && git commit -m "initial-sub"cd ..
# git submodule add ./this-is-submodule # not actually needed.
git add --all && git commit -m "initial-parent"# have an uncommitted changed file in the submoduleecho"breaking change"> this-is-submodule/myfile.txt
git diff | dunk
traceback
Traceback (most recent call last):
File "/home/user/.local/bin/dunk", line 8, in <module>
sys.exit(main())
File "/home/user/.local/pipx/venvs/dunk/lib/python3.10/site-packages/dunk/dunk.py", line 119, in main
target_code = target_file.read_text()
File "/usr/lib/python3.10/pathlib.py", line 1134, in read_text
with self.open(mode='r', encoding=encoding, errors=errors) as f:
File "/usr/lib/python3.10/pathlib.py", line 1119, in open
return self._accessor.open(self, mode, buffering, encoding, errors,
IsADirectoryError: [Errno 21] Is a directory: '/tmp/dunk-submodule-fail/this-is-submodule'
The text was updated successfully, but these errors were encountered:
Here is a minimum example the causes the crash:
traceback
The text was updated successfully, but these errors were encountered: