Re: NVDA Add-ons Community Directive: do NOT override system environment variables by assigning new strings
Hi,toggle quoted messageShow quoted text
Ah, thanks for clarifying many things for us (and for me, personally).
From: firstname.lastname@example.org <email@example.com>
On Behalf Of James Scholes
Sent: Thursday, January 21, 2021 4:16 PM
Subject: Re: [nvda-addons] NVDA Add-ons Community Directive: do NOT override
system environment variables by assigning new strings
I agree that overwriting the PATH variable rather than adding to it is a bad
idea. But just to be clear:
1. If an NVDA add-on uses os.environ, any changes made will only apply
inside the running NVDA process. Which is still bad, but the system
variable will not be altered and Windows will not collapse. When you
restart NVDA, it will get the old value back.
2. An NVDA add-on developer would really have to go out of their way to
screw up the environment variables for the user account or entire system.
If they had the knowledge or desire to do so, their intentions are likely
nefarious and probably unaffected by any community notices.
3. If you do really, legitimately want to add a directory to PATH, you
should prepend it and not append to avoid conflicts with anything in other
directories on the system which share an executable name.
On 21/01/2021 at 1:15 pm, Joseph Lee wrote:
Hi all,going forward and will be applied when reviewing add-ons:
variable is used by operating systems (in this case, Windows) to search
listed directories for executables. The variable is not really a string – it
is a list of strings separated by a semicolon.
values will break add-ons that opens executables for their features.
system environment variables without preserving existing values will be
flagged and authors will be asked to release a fix as soon as possible. Or,
for that matter, do NOT ever (EVER) modify environment variables just for
convenience (especially system path variable, as it will break NVDA,
add-ons, and quite possibly Windows). This directive takes effect
community add-ons website.
authors to see if the above community directive should be applied.
2. New add-ons or add-ons currently under review (including ones withpending review requests) will be subject to the directive before review
(including pending review) begins.
3. Developers of add-ons hosted outside community add-ons website will beasked to modify their add-ons if the above community directive should be
applied to their add-ons.
4. The NVDA Add-ons community urges developers of Acapela TTS add-on torelease a fix as soon as possible.