Skip to content

Commit 257db3b

Browse files
committed
Using shlex to split task's command-line into arguments
1 parent 231c6c9 commit 257db3b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

wfcommons/wfinstances/logs/snakemake.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import math
1414
import os
1515
import pathlib
16+
import shlex
1617

1718
from datetime import datetime, timezone
1819
from logging import Logger
@@ -213,7 +214,8 @@ def _create_tasks(self):
213214

214215
if self.task_shell[idx]:
215216
program_name = self.task_shell[idx].split(' ')[0]
216-
program_args = self.task_shell[idx].split(' ')[0:]
217+
# program_args = self.task_shell[idx].split(' ')[0:]
218+
program_args = shlex.split(self.task_shell[idx], posix=False)
217219
else:
218220
program_name = "n/a"
219221
program_args = []

0 commit comments

Comments
 (0)