Skip to content
3 changes: 2 additions & 1 deletion nf_core/pipelines/lint/container_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ def container_configs(self):

if not fixing:
# Restore working tree: reset modified tracked files and delete new untracked ones
repo_root = Path(repo.working_tree_dir).resolve()
for name in modified:
repo.git.restore(str(conf_dir / name))
repo.git.restore(str((conf_dir / name).resolve().relative_to(repo_root)))
for name in new:
(conf_dir / name).unlink(missing_ok=True)

Expand Down
Loading