On Monday, November 19, 2018 11:43 AM, Herbert Xu <herb...@gondor.apana.org.au> 
wrote:
> Sorry for the repost, I'm trying to get this into patchwork.
>
> ---8<---
> When we read the first token in list() we use peektoken instead
> of readtoken as the following code needs to use the same token
> again.  However, this is wrong when we're in a here-document as
> it will clobber the saved token without resetting the tokpushback
> flag.
>
> This patch fixes it by doing the tokpushback after parseheredoc
> and setting lasttoken again if parseheredoc was called.
>
> Reported-by: Ron Yorston <r...@frippery.org>
> Fixes: 7c245aa8ed33 ("[PARSER] Simplify EOF/newline handling in...")
> Fixes: ee5cbe9fd6bc ("[SHELL] Optimize dash -c "command" to avoid a fork")
> Signed-off-by: Herbert Xu <herb...@gondor.apana.org.au>

This works for me.

Tested-by: Simon Ser <cont...@emersion.fr>

Thanks!

Reply via email to