Skip to content

Commit

Permalink
Fix incorrect string operations on bytes output of subprocess causing…
Browse files Browse the repository at this point in the history
… wrong shell type to be selected (#1765)

Signed-off-by: Parikshit Tiwari <parikshitatiwari@gmail.com>
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
Co-authored-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
  • Loading branch information
1 parent 671e32f commit 57136a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rez/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 57136a3

Please sign in to comment.