eval: Check nflag in evaltree instead of cmdloop
commit29d6f2148f10213de4e904d515e792d2cf8c968e
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 4 Jun 2020 11:53:55 +0000 (4 21:53 +1000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 8 Jul 2020 06:58:29 +0000 (8 16:58 +1000)
treee01d542531046f38ed1b3793847fb4dcd54baf58
parent0b923162429afa275df4aabc7aab2509ad0992a6
eval: Check nflag in evaltree instead of cmdloop

This patch moves the nflag check from cmdloop into evaltree.  This
is so that nflag will be in force even if we enter the shell via a
path other than cmdloop, e.g., through sh -c.

Reported-by: Joey Hess <id@joeyh.name>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
src/eval.c
src/main.c