hush: fix a corner case of empty "do \n done" structure
The structure is: while cmd; do done bash doesn't accept it at all. We were accepting it but execution was buggy. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
1
shell/hush_test/hush-misc/while3.right
Normal file
1
shell/hush_test/hush-misc/while3.right
Normal file
@@ -0,0 +1 @@
|
||||
OK:0
|
4
shell/hush_test/hush-misc/while3.tests
Executable file
4
shell/hush_test/hush-misc/while3.tests
Executable file
@@ -0,0 +1,4 @@
|
||||
while false; do
|
||||
# bash will require at least ":" here...
|
||||
done
|
||||
echo OK:$?
|
Reference in New Issue
Block a user