bug-gzip
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20104: [PATCH] gzip: make the GZIP env var obsolescent


From: Jim Meyering
Subject: bug#20104: [PATCH] gzip: make the GZIP env var obsolescent
Date: Sun, 15 Mar 2015 09:04:40 -0700

On Fri, Mar 13, 2015 at 7:20 PM, Paul Eggert <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]