hush: fix corner cases with exec in empty expansions
Cases like these: var=val exec >redir var=val `` >redir function old new delta run_pipe 1701 1723 +22 redirect_and_varexp_helper 56 55 -1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 22/-1) Total: 21 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
3
shell/hush_test/hush-redir/redir_exec1.right
Normal file
3
shell/hush_test/hush-redir/redir_exec1.right
Normal file
@@ -0,0 +1,3 @@
|
||||
First
|
||||
hush: can't open '/cant/be/created': No such file or directory
|
||||
One:1
|
2
shell/hush_test/hush-redir/redir_exec1.tests
Executable file
2
shell/hush_test/hush-redir/redir_exec1.tests
Executable file
@@ -0,0 +1,2 @@
|
||||
v=`echo First >&2` exec >/cant/be/created
|
||||
echo One:$?
|
Reference in New Issue
Block a user