Skip to content

Commit

Permalink
Add logic to remove duplicate shell from args
Browse files Browse the repository at this point in the history
  • Loading branch information
JayDoubleu committed Feb 1, 2022
1 parent 967f039 commit 886412f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions terminatorlib/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,11 @@ def get_flatpak_args(args, envv, cwd):
"flatpak-spawn", "--host", "--watch-bus", "--forward-fd=1",
"--forward-fd=2", "--directory={}".format(cwd)
]
# Detect and remove duplicate shell in args
# to work around vte.spawn_sync() requirement.
if len(set([args[0], args[1]])) == 1:
del args[0]

flatpak_args = flatpak_spawn + env_args + args

dbg('returned flatpak args: %s' % flatpak_args)
Expand Down

0 comments on commit 886412f

Please sign in to comment.