From 92b8323a8be6c30adc9a5d258508f8fdf1843cef Mon Sep 17 00:00:00 2001 From: CaliBrain Date: Tue, 13 Jan 2026 00:08:49 -0500 Subject: [PATCH] make os mv and cp commands non interactive (#430) - fix(fs): handle NFS permission errors with robust fallback - Catch PermissionError/OSError(EPERM) in atomic_move and atomic_copy - Implement layered fallback: shutil.copyfile (content only) -> system mv/cp - Add _perform_nfs_fallback and _system_op helpers to reduce duplication - Set fallback logging to DEBUG to reduce spam on NFS mounts - make os mv and cp commands non interactive (-f) --- shelfmark/download/fs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shelfmark/download/fs.py b/shelfmark/download/fs.py index 801b3b10..daac065a 100644 --- a/shelfmark/download/fs.py +++ b/shelfmark/download/fs.py @@ -63,7 +63,7 @@ def _system_op(op: str, source: Path, dest: Path) -> None: """Execute system command (mv or cp) as final fallback.""" logger.info(f"Attempting system {op} as final fallback: {source} -> {dest}") subprocess.run( - [op, str(source), str(dest)], + [op, "-f", str(source), str(dest)], check=True, capture_output=True, text=True