From 57136a3f28969672cccb1280661e785f4474f6a1 Mon Sep 17 00:00:00 2001 From: Parikshit Tiwari Date: Sat, 29 Jun 2024 20:10:54 +0530 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: