From 431f0ef5b647366e3e214baa5544c8d612a281d7 Mon Sep 17 00:00:00 2001 From: Jose Enriquez Date: Thu, 26 Sep 2024 17:27:50 -0400 Subject: [PATCH] Fix incorrect string operations on bytes output of subprocess causing wrong shell type to be selected (#1765) Signed-off-by: Parikshit Tiwari Signed-off-by: Jean-Christophe Morin Co-authored-by: Jean-Christophe Morin --- src/rez/system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rez/system.py b/src/rez/system.py index 25780c1e7..8486a71af 100644 --- a/src/rez/system.py +++ b/src/rez/system.py @@ -86,7 +86,7 @@ def shell(self): # print an error message: "process ID out of range". try: args = ['ps', '-o', 'args=', '-p', str(parent_pid)] - proc = sp.Popen(args, stdout=sp.PIPE) + proc = sp.Popen(args, stdout=sp.PIPE, text=True) output = proc.communicate()[0] shell = os.path.basename(output.strip().split()[0]).replace('-', '') except Exception: