Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Environment variables with nonstandard names are silently dropped on macOS
- X-seq: zsh-workers 41422
- From: Radon Rosborough <radon.neon@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Environment variables with nonstandard names are silently dropped on macOS
- Date: Thu, 13 Jul 2017 14:07:03 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=G6i6/1PH5hZjE1CQ37hINJ8IKeY+VtivIx+Pd19AjL0=; b=onYrO1231rOIRRNymnFduflSJUJ5eRlcG/bc1IWT0TeUaXvWbJC7/7WUZ/SKj9mCdh h/aOPpD5WjoWRlmaenhW9gSRxtyPv8CMO1RrdsuPLmLGTSDE7wUUCb3nCC9aAync8RWM J91VnCEUFACZFknxcb4yVkhCU8mt+eFu5uYtuwiLDrdAmo64hvV4jOlEGLOeztNeo1k6 xd+ZYmpPa6fTw6YzVum7n8NJXTW0XNvhevldDWur4WKAZrqNFhzXxNQ288JMHpoKaatf vVJG0KW0UWgz1fIK2lbzDPb39a77vDDGJ9shDjiUK1fc5vHJT7/ZFzPcEFt7DTSB87hf NI9g==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author