aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c
index a2e06184b..0d7cac0b5 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -8987,6 +8987,9 @@ localcmd(int argc UNUSED_PARAM, char **argv)
{
char *name;
+ if (!funcnest)
+ ash_msg_and_raise_error("not in a function");
+
argv = argptr;
while ((name = *argv++) != NULL) {
mklocal(name);