summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Gonzalez <rgonzalez@fluendo.com>2024-11-13 23:57:28 +0100
committerNirbheek Chauhan <nirbheek@centricular.com>2024-11-15 16:52:31 +0530
commit9dbfa8b0750eef2a2fe0d5c736f205a74af2a8e5 (patch)
tree998ae61a975e47ac9ef70b3537ab97ac7866e462
parenta495d2c473bc0fb60075b5fa326df96544e4e6f2 (diff)
shell: fix TemporaryDirectory error with the with statement when ZSH1.24
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: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1638>
-rw-r--r--cerbero/utils/shell.py2
1 files changed, 1 insertions, 1 deletions
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