fix: add expanduser() to properly handle tilde in paths

This commit is contained in:
Paul Gauthier (aider) 2024-12-03 08:25:58 -08:00
parent 44909912cd
commit 40da942bfe

View file

@ -567,7 +567,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
fnames = [str(Path(fn).resolve()) for fn in all_files]
read_only_fnames = []
for fn in args.read or []:
path = Path(fn).resolve()
path = Path(fn).expanduser().resolve()
if path.is_dir():
read_only_fnames.extend(str(f) for f in path.rglob("*") if f.is_file())
else: