Skip to content

Commit

Permalink
[SCons] Keep SCons initial PATH when propagating PATH
Browse files Browse the repository at this point in the history
Fixes errors on Windows when Visual Studio is not on the PATH but has been
found by SCons instead.
  • Loading branch information
speth committed Feb 12, 2017
1 parent eae9250 commit 66998a5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -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.'
Expand Down

0 comments on commit 66998a5

Please sign in to comment.