1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-09-22 11:51:04 +02:00

21082: Dan Nelson: fix zsh -c exit status on parse error

This commit is contained in:
Peter Stephenson 2005-04-04 09:35:36 +00:00
parent aac33a33a1
commit 82c9c7a423
3 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2005-04-04 Peter Stephenson <pws@csr.com>
* Dan Nelson: 21082: Src/exec.c, Test/A01grammar.ztst: fix zsh -c
exit status on parse error.
2005-04-03 Andrey Borzenkov <bor@zsh.org>
* 21086: Completion/Unix/Command/_rsync: fix module completion,

View File

@ -162,6 +162,8 @@ parse_string(char *s)
lineno = 1;
p = parse_list();
lineno = oldlineno;
if (tok == LEXERR && !lastval)
lastval = 1;
strinend();
inpop();
lexrestore();

View File

@ -447,4 +447,8 @@
$ZTST_testdir/../Src/zsh -f <unmatched_quote.txt
1:Parse error on standard input causes non-zero exit status
?zsh: unmatched '
$ZTST_testdir/../Src/zsh -f -c "'"
1:Parse error on inline command causes non-zero exit status
?zsh: unmatched '