about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/params.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/params.c b/Src/params.c
index 7ba0359b7..98888e7b0 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -594,8 +594,8 @@ createparamtable(void)
 	addenv(pm, pm->u.str);
     pm = (Param) paramtab->getnode(paramtab, "SHLVL");
     sprintf(buf, "%d", (int)++shlvl);
-    if (!(pm->flags & PM_EXPORTED))
-	addenv(pm, buf);
+    /* shlvl value in environment needs updating unconditionally */
+    addenv(pm, buf);
 
     /* Add the standard non-special parameters */
     set_pwd_env();