better warnings on files that are missing or not normal

This commit is contained in:
Paul Gauthier 2023-10-19 10:09:16 -07:00
parent 54742a2d75
commit cd30e531be

View file

@ -310,7 +310,12 @@ class RepoMap:
for fname in fnames:
if not Path(fname).is_file():
if fname not in self.warned_files:
self.io.tool_error(f"Repo-map can't include {fname}")
if Path(fname).exists():
self.io.tool_error(
f"Repo-map can't include {fname}, it is not a normal file"
)
else:
self.io.tool_error(f"Repo-map can't include {fname}, it no longer exists")
self.warned_files.add(fname)
continue