We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8eada87 + 8419c86 commit 5080c6bCopy full SHA for 5080c6b
Interlace/lib/threader.py
@@ -1,9 +1,15 @@
1
import subprocess
2
+import os
3
from concurrent.futures import ThreadPoolExecutor
4
from multiprocessing import Event
-
5
from tqdm import tqdm
6
7
+import platform
8
+
9
+if platform.system().lower() == 'linux':
10
+ shell = os.getenv("SHELL") if os.getenv("SHELL") else "/bin/sh"
11
+else:
12
+ shell = None
13
14
class Task(object):
15
def __init__(self, command):
@@ -49,7 +55,8 @@ def get_lock(self):
49
55
def _run_task(self, t=False):
50
56
s = subprocess.Popen(self.task, shell=True,
51
57
stdout=subprocess.PIPE,
52
- encoding="utf-8")
58
+ encoding="utf-8",
59
+ executable=shell)
53
60
out, _ = s.communicate()
54
61
62
if out != "":
0 commit comments