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: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/238>
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__":