From 9dbfa8b0750eef2a2fe0d5c736f205a74af2a8e5 Mon Sep 17 00:00:00 2001 From: Ruben Gonzalez Date: Wed, 13 Nov 2024 23:57:28 +0100 Subject: shell: fix TemporaryDirectory error with the with statement when ZSH From https://docs.python.org/3/library/tempfile.html#tempfile.TemporaryDirectory.name: > The directory name can be retrieved from the name attribute of the > returned object. When the returned object is used as a context > manager, the name will be assigned to the target of the as clause in > the with statement, if there is one. Bug added in https://gitlab.freedesktop.org/gstreamer/cerbero/-/commit/5a8b7625730d8aad90c29996a0918c3a99d87abd Part-of: --- cerbero/utils/shell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cerbero/utils/shell.py b/cerbero/utils/shell.py index ad302943..528fe969 100644 --- a/cerbero/utils/shell.py +++ b/cerbero/utils/shell.py @@ -669,7 +669,7 @@ C:\\msys64\\msys2_shell.cmd -ucrt64 -defterm -no-start -here -use-full-path -c ' rc_tmp.write(shellrc) rc_tmp.flush() if 'zsh' in shell: - env['ZDOTDIR'] = tmp.name + env['ZDOTDIR'] = tmp os.execlpe(shell, shell, env) else: # Check if the shell supports passing the rcfile -- cgit v1.2.3