From f3481b43bd892cde7b32af19a92393008257013e Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sat, 12 Oct 2019 01:10:57 +0000 Subject: Make execlineb itself honor EXECLINE_STRICT --- src/execline/execlineb.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src') diff --git a/src/execline/execlineb.c b/src/execline/execlineb.c index e93c3e9..7397be5 100644 --- a/src/execline/execlineb.c +++ b/src/execline/execlineb.c @@ -1,6 +1,8 @@ /* ISC license. */ #include +#include + #include #include #include @@ -132,6 +134,20 @@ int main (int argc, char const *const *argv, char const *const *envp) if (!env_addmodif(&modif, "EXECLINE_STRICT", flagstrict ? fmt : 0)) goto errenv ; } + else + { + char const *x = getenv("EXECLINE_STRICT") ; + if (x) + { + unsigned int u ; + if (!uint0_scan(x, &u)) + { + strerr_warnw1x("invalid EXECLINE_STRICT value, unsetting it") ; + if (!env_addmodif(&modif, "EXECLINE_STRICT", 0)) goto errenv ; + } + else flagstrict = u ; + } + } if (flagpushenv == 3 || flagpushenv == 4) { -- cgit v1.2.3