mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 05:59:10 +00:00
gst-env: Fix shell name check
We should use `endswith`, not `in`. Else we'll match paths like: `/home/arbash/.local/bin/fish` as a bash shell, not a fish shell.
This commit is contained in:
parent
e13e6758e3
commit
245baadbce
1 changed files with 2 additions and 2 deletions
|
@ -374,7 +374,7 @@ if __name__ == "__main__":
|
||||||
args += ['/k', 'prompt [gst-{}] $P$G'.format(gst_version)]
|
args += ['/k', 'prompt [gst-{}] $P$G'.format(gst_version)]
|
||||||
else:
|
else:
|
||||||
args = [os.environ.get("SHELL", os.path.realpath("/bin/sh"))]
|
args = [os.environ.get("SHELL", os.path.realpath("/bin/sh"))]
|
||||||
if "bash" in args[0] and not strtobool(os.environ.get("GST_BUILD_DISABLE_PS1_OVERRIDE", r"FALSE")):
|
if args[0].endswith('bash') and not strtobool(os.environ.get("GST_BUILD_DISABLE_PS1_OVERRIDE", r"FALSE")):
|
||||||
tmprc = tempfile.NamedTemporaryFile(mode='w')
|
tmprc = tempfile.NamedTemporaryFile(mode='w')
|
||||||
bashrc = os.path.expanduser('~/.bashrc')
|
bashrc = os.path.expanduser('~/.bashrc')
|
||||||
if os.path.exists(bashrc):
|
if os.path.exists(bashrc):
|
||||||
|
@ -385,7 +385,7 @@ if __name__ == "__main__":
|
||||||
# Let the GC remove the tmp file
|
# Let the GC remove the tmp file
|
||||||
args.append("--rcfile")
|
args.append("--rcfile")
|
||||||
args.append(tmprc.name)
|
args.append(tmprc.name)
|
||||||
if 'fish' in args[0]:
|
if args[0].endswith('fish'):
|
||||||
# Ignore SIGINT while using fish as the shell to make it behave
|
# Ignore SIGINT while using fish as the shell to make it behave
|
||||||
# like other shells such as bash and zsh.
|
# like other shells such as bash and zsh.
|
||||||
# See: https://gitlab.freedesktop.org/gstreamer/gst-build/issues/18
|
# See: https://gitlab.freedesktop.org/gstreamer/gst-build/issues/18
|
||||||
|
|
Loading…
Reference in a new issue