env -u unexpected behaviour
Keith Maxwell
keith.maxwell at gmail.com
Thu Dec 7 06:46:22 UTC 2017
Hello all
When I run `busybox env -u MANPAGER pwd` I get `env: invalid number
'MANPAGER'`. I'm using busybox 1.27 provided by Alpine Linux.
An easy way to reproduce this is:
$ mirror=https://uk.alpinelinux.org/alpine
$ curl "${mirror}/v3.7/main/x86_64/busybox-static-1.27.2-r6.apk" | tar xz
$ ./bin/busybox.static env -u MANPAGER pwd
env: invalid number 'MANPAGER'
For comparison I was expecting the same result as from the coreutils
implementation.
$ env --version | head -n 1
env (GNU coreutils) 8.25
$ env -u MANPAGER pwd
/
I know Alpine Linux is based on musl-libc and looking at the source
code[1] I can see a reference to using an undocumented feature of
putenv, but that is as far as I have got.
Are you able to help please? Is this a bug?
Kind Regards
Keith
[1] https://git.busybox.net/busybox/tree/coreutils/env.c#n75
More information about the busybox
mailing list