[Scons-users] TypeError writing to stderror in MSCommon/Common.py [reformatted]
Bill Deegan
bill at baddogconsulting.com
Wed Dec 4 18:06:29 EST 2019
What's powershell.exe's default location?
Should we have this on the PATH for win32?
On Wed, Dec 4, 2019 at 1:52 PM Joseph C. Brill <jbrill at mindspring.com>
wrote:
> The following approach seems reasonable to suppress the powershell.exe
> invocations in vsdevcmd.bat (VS 2019 16.4) when powershell.exe is not on
> the
> path in function get_output of common.py (comments removed and whitespace
> added):
>
> vscmd_skip_telemetry = 'VSCMD_SKIP_SENDTELEMETRY'
>
> vs_vc_vars = [
> 'COMSPEC',
> vscmd_skip_telemetry,
> 'VS140COMNTOOLS',
> 'VS120COMNTOOLS',
> 'VS110COMNTOOLS',
> 'VS100COMNTOOLS',
> 'VS90COMNTOOLS',
> 'VS80COMNTOOLS',
> 'VS71COMNTOOLS',
> 'VS70COMNTOOLS',
> 'VS60COMNTOOLS',
> ]
>
> env['ENV'] = normalize_env(env['ENV'], vs_vc_vars, force=False)
>
> if vscmd_skip_telemetry not in env['ENV']:
> if not env.WhereIs('powershell.exe'):
> env['ENV'][vscmd_skip_telemetry] = '1'
>
> The telemetry environment variable is added to the list passed to normalize
> the environment.
>
> If the user did not define the telemetry environment variable, check to see
> if powershell.exe is on the path.
>
> If powershell.exe is not on the path and the user did not define the
> telemetry variable, add the variable to the environment to suppress
> vsdevcmd.bat from invoking powershell.
>
> If a user really wants telemetry, the user is responsible for getting
> powershell.exe on the system path which would not automatically add the
> telemetry variable to the environment.
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20191204/5313d3c0/attachment.html>
More information about the Scons-users
mailing list