From d5b6cc88f9308bfd73d9f9f7a2ef586ee1d1c79d Mon Sep 17 00:00:00 2001 From: Andrey Moiseev Date: Mon, 5 Apr 2021 07:00:34 +0000 Subject: [PATCH] gst-env: Windows: Fix looking for cmd_or_ps.ps1 in the wrong directory At the point of get_windows_shell() execution, the current directory equals DEFAULT_BUILDDIR=./build. But cmd_or_ps.ps1 is in SCRIPTDIR=./ (repo root). Point subprocess.check_output() to the correct directory. Part-of: --- gst-env.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst-env.py b/gst-env.py index fcd7863..0fa40f5 100755 --- a/gst-env.py +++ b/gst-env.py @@ -433,7 +433,7 @@ def get_subprocess_env(options, gst_version): def get_windows_shell(): command = ['powershell.exe' ,'-noprofile', '-executionpolicy', 'bypass', '-file', 'cmd_or_ps.ps1'] - result = subprocess.check_output(command) + result = subprocess.check_output(command, cwd=SCRIPTDIR) return result.decode().strip() if __name__ == "__main__": -- 2.7.4