From 511268cd189739dc0bd950092f60114a1e314851 Mon Sep 17 00:00:00 2001 From: Serge Bazanski Date: Wed, 24 Jul 2019 13:31:37 +0200 Subject: [PATCH] sby_core: fix hardcoded /bin/bash path Not all systems (eg. BSDs, NixOS) have a /bin/bash. The de-facto standard for maximum compatibility these days is using /usr/bin/env bash. --- sbysrc/sby_core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbysrc/sby_core.py b/sbysrc/sby_core.py index 54e6c17..98f4032 100644 --- a/sbysrc/sby_core.py +++ b/sbysrc/sby_core.py @@ -135,7 +135,7 @@ class SbyTask: signal.signal(signal.SIGINT, signal.SIG_IGN) os.setpgrp() - self.p = subprocess.Popen(["/bin/bash", "-c", self.cmdline], stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, + self.p = subprocess.Popen(["/usr/bin/env", "bash", "-c", self.cmdline], stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=(subprocess.STDOUT if self.logstderr else None), preexec_fn=preexec_fn) fl = fcntl.fcntl(self.p.stdout, fcntl.F_GETFL) -- 2.30.2