aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mdevenv.py
diff options
context:
space:
mode:
authorSeungha Yang <seungha@centricular.com>2022-06-15 06:59:33 +0900
committerXavier Claessens <xclaesse@gmail.com>2022-06-14 19:09:25 -0400
commitee7a7fec10298e8dabc423f6163e866d19473e7f (patch)
treea5da9b8d6f1f640691451bf9d2707c56cb49fecb /mesonbuild/mdevenv.py
parentd85a9733e6af45c9e3111f23ecec9e614eaeaeeb (diff)
downloadmeson-ee7a7fec10298e8dabc423f6163e866d19473e7f.zip
meson-ee7a7fec10298e8dabc423f6163e866d19473e7f.tar.gz
meson-ee7a7fec10298e8dabc423f6163e866d19473e7f.tar.bz2
devenv: Add support for PowerShell 7 on Windows
Checks "pwsh.exe" in addition to "powershell.exe" and "cmd.exe" to support PowerShell 7 on Windows. The Powershell 7 support was added in GStreamer (which is the origin of this script) already via https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2545
Diffstat (limited to 'mesonbuild/mdevenv.py')
-rw-r--r--mesonbuild/mdevenv.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/mesonbuild/mdevenv.py b/mesonbuild/mdevenv.py
index 041d22d..46b301c 100644
--- a/mesonbuild/mdevenv.py
+++ b/mesonbuild/mdevenv.py
@@ -185,9 +185,8 @@ def run(options: argparse.Namespace) -> int:
args = [shell_env]
elif is_windows():
shell = get_windows_shell()
- if shell == 'powershell.exe':
- args = ['powershell.exe']
- args += ['-NoLogo', '-NoExit']
+ if shell in ['powershell.exe', 'pwsh.exe']:
+ args = [shell, '-NoLogo', '-NoExit']
prompt = f'function global:prompt {{ "{prompt_prefix} PS " + $PWD + "> "}}'
args += ['-Command', prompt]
else: