On Fri, Mar 13, 2015 at 7:20 PM, Paul Eggert <egg...@cs.ucla.edu> wrote:
> Attached is a proposed patch to make the GZIP environment variable
> obsolescent, for the same reason we're making GREP_OPTIONS obsolescent: it's
> too much opportunity for trouble.  For example, with a suitably crafted GZIP
> environment variable I can cause 'gzip' to remove files.

Hi Paul,
Thanks for getting the ball rolling.
That patch makes it so use of the GZIP envvar makes gzip fail with
exit status 2:

  $ echo |./gzip > k
  $ echo |GZIP=-1 ./gzip > k
  gzip: warning: GZIP environ var is deprecated; please use an alias or script
  [Exit 2]

Making that clear feels like sufficient justification for adding a test.
If making GZIP use provoke failure is deliberate, the NEWS should say that,
for those who don't recall that a gzip warning implies nonzero exit status.
Also, you may want to spell out "environment variable" in that diagnostic.
Finally, for something prescriptive like that, I would drop the "please".



Reply via email to