From 17151e977e97f20af2e85f1c5a27e704f01ab569 Mon Sep 17 00:00:00 2001 From: Michael Ernst Date: Fri, 10 May 2024 10:30:33 -0700 Subject: [PATCH] Don't require input if `-delete-workdir` is passed --- src/python/replay_merge.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/python/replay_merge.py b/src/python/replay_merge.py index 77027c3837..fc07f45c6c 100755 --- a/src/python/replay_merge.py +++ b/src/python/replay_merge.py @@ -95,9 +95,12 @@ def merge_replay( logger.info( f"workdir {WORKDIR_DIRECTORY / workdir} already exists for idx: {merge_idx}" ) - answer = input( - f"workdir {workdir} exists for idx: {merge_idx}. Delete it? (y/n)" - ) + if delete_workdir: + answer = "y" + else: + answer = input( + f"workdir {workdir} exists for idx: {merge_idx}. Delete it? (y/n)" + ) if answer == "y": shutil.rmtree(WORKDIR_DIRECTORY / workdir) else: