[PATCH] ash: fix a regression in handling local variables

Denys Vlasenko vda.linux at googlemail.com
Sat Apr 18 17:42:03 UTC 2015


On Fri, Apr 17, 2015 at 1:58 AM, Felix Fietkau <nbd at openwrt.org> wrote:
> commit 109ee5d33694a03cda3424b4846584250832ba8e
> "ash: make "locak VAR" unset VAR (bash does that)"
>
> This commit introduced a regression where calling local on an already
> local variable unsets it. This does not match bash behavior.
>
> Update test case to check for this behavior

Since we need to check whether variable is local, it makes sense to
avoid creating a duplicate entry in "localvars" linked list too,
if we discover that it is, indeed, an already-local variable.

I committed a fix which does that.

Thanks!


More information about the busybox mailing list