summaryrefslogtreecommitdiffstats
path: root/bin/sh/expand.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sh/expand.c')
-rw-r--r--bin/sh/expand.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/sh/expand.c b/bin/sh/expand.c
index f6a0a09..46214b9 100644
--- a/bin/sh/expand.c
+++ b/bin/sh/expand.c
@@ -657,6 +657,17 @@ again: /* jump here after setting a variable with ${var=text} */
}
varlen = 0;
startloc = expdest - stackblock();
+ if (!set && uflag) {
+ switch (subtype) {
+ case VSNORMAL:
+ case VSTRIMLEFT:
+ case VSTRIMLEFTMAX:
+ case VSTRIMRIGHT:
+ case VSTRIMRIGHTMAX:
+ case VSLENGTH:
+ error("%.*s: parameter not set", p - var - 1, var);
+ }
+ }
if (set && subtype != VSPLUS) {
/* insert the value of the variable */
if (special) {
OpenPOWER on IntegriCloud