Skip to content

Commit

Permalink
#3407 locate 'bash' or use 'sh'
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Jan 3, 2022
1 parent bf8b32e commit 8a4bff4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xpra/server/server_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ def decode(out):
else:
source = '%ssource %s' % ("set -a && " if include_unexported_variables else "", filename)
dump = 'python%i.%i -c "import os, json;print(json.dumps(dict(os.environ)))"' % (sys.version_info.major, sys.version_info.minor)
cmd = ['/bin/bash', '-c', '%s 1>&2 && %s' % (source, dump)]
sh = which("bash") or "/bin/sh"
cmd = [sh, '-c', '%s 1>&2 && %s' % (source, dump)]
def decode(out):
try:
env = json.loads(out)
Expand Down

0 comments on commit 8a4bff4

Please sign in to comment.