From da46e1984b05e579576abd332c23992e2500aa68 Mon Sep 17 00:00:00 2001 From: Emily Schmidt Date: Tue, 2 Apr 2024 13:32:24 +0100 Subject: [PATCH] Fixes issue #269 by removing an erroneous "if sbyfile" check. This commit removes an erroneous "if sbyfile" that would turn '-f' into a no-op for stdin input files. Presumably this check was originally intended to handle the case of stdin input file and no specified workdir (which uses a temporary workdir). In the current version the check is redundant for this particular case. The check is erroneous in the case of stdin input file and a specified workdir, so we simply remove the check. --- sbysrc/sby.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sbysrc/sby.py b/sbysrc/sby.py index c21ab0ba..a91a18a1 100644 --- a/sbysrc/sby.py +++ b/sbysrc/sby.py @@ -422,8 +422,7 @@ def start_task(taskloop, taskname): if opt_force and not reusedir: early_log(my_workdir, f"Removing directory '{os.path.abspath(my_workdir)}'.") - if sbyfile: - shutil.rmtree(my_workdir, ignore_errors=True) + shutil.rmtree(my_workdir, ignore_errors=True) if reusedir: pass