From f62119b8f8d925e4e7e4803010f70a8fef3b28d4 Mon Sep 17 00:00:00 2001 From: abdallaEG <52584554+alanEG@users.noreply.github.com> Date: Sun, 2 May 2021 04:28:03 +0200 Subject: [PATCH 1/2] Update threader.py --- Interlace/lib/threader.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Interlace/lib/threader.py b/Interlace/lib/threader.py index 8ba4796..1cfaaf8 100644 --- a/Interlace/lib/threader.py +++ b/Interlace/lib/threader.py @@ -1,9 +1,10 @@ import subprocess +import os from concurrent.futures import ThreadPoolExecutor from multiprocessing import Event - from tqdm import tqdm +shell = os.getenv("SHELL") if os.getenv("SHELL") else "/bin/sh" class Task(object): def __init__(self, command): @@ -49,7 +50,8 @@ def get_lock(self): def _run_task(self, t=False): s = subprocess.Popen(self.task, shell=True, stdout=subprocess.PIPE, - encoding="utf-8") + encoding="utf-8", + executable=shell) out, _ = s.communicate() if out != "": From 8419c86d7488bac174c5cff0768514738e41ae80 Mon Sep 17 00:00:00 2001 From: abdallaEG <52584554+alanEG@users.noreply.github.com> Date: Thu, 6 May 2021 07:45:25 +0200 Subject: [PATCH 2/2] Update threader.py --- Interlace/lib/threader.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Interlace/lib/threader.py b/Interlace/lib/threader.py index 1cfaaf8..3ab1d2d 100644 --- a/Interlace/lib/threader.py +++ b/Interlace/lib/threader.py @@ -4,7 +4,12 @@ from multiprocessing import Event from tqdm import tqdm -shell = os.getenv("SHELL") if os.getenv("SHELL") else "/bin/sh" +import platform + +if platform.system().lower() == 'linux': + shell = os.getenv("SHELL") if os.getenv("SHELL") else "/bin/sh" +else: + shell = None class Task(object): def __init__(self, command):