1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-12-28 04:05:12 +01:00

52360: simplify and improve bad-descriptor detection in %prep section

This commit is contained in:
Bart Schaefer 2023-12-02 15:14:12 -08:00
parent 10bb67df5a
commit 1ba0fff93c
2 changed files with 8 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2023-12-02 Bart Schaefer <schaefer@zsh.org>
* 52360: Test/A04redirect.ztst: Simplify bad-descriptor check in
%prep -- avoids accidentally using an open descriptor (derived
from German Riano: 52328)
2023-11-29 Bart Schaefer <schaefer@zsh.org>
* Sebastian Gniazdowski: 52145: Functions/Prompts/prompt_sprint2_setup:

View file

@ -3,9 +3,8 @@
%prep
mkdir redir.tmp && cd redir.tmp
myfd=99
(echo >&$myfd) 2>msg
bad_fd_msg="${$(<msg)##*:}"
bad_fd_msg="${$( { exec 9>&-; echo >&9 } 2>&1)##*:}"
[[ -n "$bad_fd_msg" ]]
%test