zsh-workers
 help / color / mirror / code / Atom feed
From: Radon Rosborough <radon.neon@gmail.com>
To: zsh-workers@zsh.org
Subject: Environment variables with nonstandard names are silently dropped on macOS
Date: Thu, 13 Jul 2017 14:07:03 -0700	[thread overview]
Message-ID: <CADB4rJGm=juEDoaNXouUJYnNNsh2ctM2sxa5sMaCfpdem0epfw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 932 bytes --]

Hi all,

I recently upgraded from Zsh 5.2 to Zsh 5.3.1, and found that Zsh has
acquired a habit of silently dropping environment variables that have
"nonstandard" names (e.g. they contain periods). The test case to reproduce
is:

    env FOO.BAR=QUUX zsh -c 'printenv FOO.BAR'

In Zsh 5.2 on all operating systems, this prints QUUX. In Zsh 5.3.1 on
macOS (but not elsewhere), it prints nothing and returns nonzero.

The bug was introduced in commit 9dffe404a464289aedade8762795ee4d1bbb1d3f,
which adds a special case for macOS pertaining to environment variable
handling. The patch was designed to fix a more serious bug, namely that
leading equals signs were trimmed in environment variable *values*, but
unfortunately it also introduced this one.

I couldn't find any reference to the issue online, so I thought I would
bring it up here. I don't have the time or skills to contribute a fix,
unfortunately.

Best,
Radon Rosborough

             reply	other threads:[~2017-07-13 21:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-13 21:07 Radon Rosborough [this message]
2017-07-13 23:13 ` Bart Schaefer
2017-07-13 23:35   ` Radon Rosborough

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADB4rJGm=juEDoaNXouUJYnNNsh2ctM2sxa5sMaCfpdem0epfw@mail.gmail.com' \
    --to=radon.neon@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).