From b5eb5b3c7837ba7565a06d5079d23b86cc1b85b0 Mon Sep 17 00:00:00 2001 From: "William D. Jones" Date: Fri, 15 Mar 2019 23:14:12 -0400 Subject: [PATCH] Choose command separator for tasks based on OS. Signed-off-by: William D. Jones --- sbysrc/sby_core.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/sbysrc/sby_core.py b/sbysrc/sby_core.py index 7db60c8..608cca1 100644 --- a/sbysrc/sby_core.py +++ b/sbysrc/sby_core.py @@ -33,7 +33,19 @@ class SbyTask: self.job = job self.info = info self.deps = deps - self.cmdline = cmdline + if os.name == "posix": + self.cmdline = cmdline + else: + replacements = { + ";" : "&", + "{" : "(", + "}" : ")", + } + + cmdline_copy = cmdline + for u, w in replacements.items(): + cmdline_copy = cmdline_copy.replace(u, w) + self.cmdline = cmdline_copy self.logfile = logfile self.noprintregex = None self.notify = [] -- 2.30.2