zsh-workers
 help / color / mirror / code / Atom feed
* Environment variables with nonstandard names are silently dropped on macOS
@ 2017-07-13 21:07 Radon Rosborough
  2017-07-13 23:13 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Radon Rosborough @ 2017-07-13 21:07 UTC (permalink / raw)
  To: zsh-workers

[-- 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-13 23:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-13 21:07 Environment variables with nonstandard names are silently dropped on macOS Radon Rosborough
2017-07-13 23:13 ` Bart Schaefer
2017-07-13 23:35   ` Radon Rosborough

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).