Chet,
Ha, yeah, i just repeated the bug you mention where PATH=... command -p ... leaves the PATH set that way in the caller context. (oops!). Actually, in case it's relevant, i found a strange side-effect of that bug when a pipeline is involved (forgive my normal chaotic PATH)
$ env | grep ^PATH
PATH=/usr/sbin:/sbin:/opt/bin:/opt/sbin:/usr/local/jdk:/home/sdowdy/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/bin:/usr/bin
What's our caller's PATH env var?
$ command -p env | grep ^PATH
PATH=/bin:/usr/bin
(BUG) What happens (incorrectly) inside 'bash' ('bash' sets a temporary PATH, then invokes the command.)
$ env | grep ^PATH
PATH=/usr/sbin:/sbin:/opt/bin:/opt/sbin:/usr/local/jdk:/home/sdowdy/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/bin:/usr/bin
But, our PATH in the caller is still correct
$ PATH=/usr/sbin:/sbin:/usr/bin:/bin command -p env >/dev/null
$ env | grep ^PATH
PATH=/usr/sbin:/sbin:/usr/bin:/bin
(BUG) PATH is now permanently set in caller environment when using a temporary invocation PATH value, whoops
$ PATH=/usr/sbin:/sbin:/usr/bin:/bin command -p env | grep ^PATH
PATH=/bin:/usr/bin
$ env | grep ^PATH
PATH=/usr/sbin:/sbin:/opt/bin:/opt/sbin:/usr/local/jdk:/home/sdowdy/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/bin:/usr/bin
PATH in caller is still the same (correct), due to some side-effect of doing this in a pipeline.
Again, thanks for the fix. but, since i'm on Debian Stable, i'll see it in 3 years ;)
--stephen