From 6951a1e0b2ce74ad8f2b30243e721c3890dcdda8 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 15 Sep 2008 08:57:25 +0000 Subject: 25671: non existing variable in typeset -p should cause status 1 --- Src/builtin.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Src') diff --git a/Src/builtin.c b/Src/builtin.c index 8246453f4..4772e0a8c 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -2479,8 +2479,10 @@ bin_typeset(char *name, char **argv, Options ops, int func) if (OPT_ISSET(ops,'p')) { if (hn) printparamnode(hn, printflags); - else + else { zwarnnam(name, "no such variable: %s", asg->name); + returnval = 1; + } continue; } if (!typeset_single(name, asg->name, (Param)hn, -- cgit 1.4.1