[SCons] Keep SCons initial PATH when propagating PATH
Fixes errors on Windows when Visual Studio is not on the PATH but has been found by SCons instead.
This commit is contained in:
parent
eae9250f2e
commit
66998a5ae1
1 changed files with 5 additions and 2 deletions
|
|
@ -693,9 +693,12 @@ if env['env_vars'] == 'all':
|
|||
elif env['env_vars']:
|
||||
for name in env['env_vars'].split(','):
|
||||
if name in os.environ:
|
||||
env['ENV'][name] = os.environ[name]
|
||||
if name == 'PATH':
|
||||
env.AppendENVPath('PATH', os.environ['PATH'])
|
||||
else:
|
||||
env['ENV'][name] = os.environ[name]
|
||||
if env['VERBOSE']:
|
||||
print 'Propagating environment variable {0}={1}'.format(name, os.environ[name])
|
||||
print 'Propagating environment variable {0}={1}'.format(name, env['ENV'][name])
|
||||
elif name not in defaults.env_vars.split(','):
|
||||
print 'WARNING: failed to propagate environment variable', repr(name)
|
||||
print ' Edit cantera.conf or the build command line to fix this.'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue