From 4cc0bf25bd383ad1b8d6f91ad0d46efbeeebe5d8 Mon Sep 17 00:00:00 2001 From: Marco Donadoni Date: Wed, 20 Nov 2024 16:40:00 +0100 Subject: [PATCH] fix(htcondorcern): support multiline commands (#474) Closes #470 --- reana_job_controller/htcondorcern_job_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reana_job_controller/htcondorcern_job_manager.py b/reana_job_controller/htcondorcern_job_manager.py index 7b7795b..8956a72 100644 --- a/reana_job_controller/htcondorcern_job_manager.py +++ b/reana_job_controller/htcondorcern_job_manager.py @@ -164,7 +164,7 @@ def _format_arguments(self): # Take only the user's command, removes the change directory to workflow workspace # added by RWE-Serial/Snakemake since HTCondor implementation does not need it. # E.g. "cd /path/to/workspace ; user-command" -> "user-command" - base_cmd = " ".join(self.cmd.split()[3:]) + base_cmd = self.cmd.split(maxsplit=3)[3] if self.workflow.type_ == "snakemake": # For Snakemake workflows, also remove the workspace path from # `jobfinished` and `jobfailed` touch commands.