mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-19 08:29:45 +01:00
Fix exec_command & waf -v & custom path in environment
This commit is contained in:
parent
9c1f2a0a33
commit
a739525f3e
@ -347,7 +347,7 @@ class Context(ctx):
|
||||
if 'stderr' not in kw:
|
||||
kw['stderr'] = subprocess.PIPE
|
||||
|
||||
if Logs.verbose and not kw['shell'] and not Utils.check_exe(cmd[0]):
|
||||
if Logs.verbose and not kw['shell'] and not Utils.check_exe(cmd[0], env=kw.get('env', os.environ)):
|
||||
# This call isn't a shell command, and if the specified exe doesn't exist, check for a relative path being set
|
||||
# with cwd and if so assume the caller knows what they're doing and don't pre-emptively fail
|
||||
if not (cmd[0][0] == '.' and 'cwd' in kw):
|
||||
@ -425,7 +425,7 @@ class Context(ctx):
|
||||
quiet = kw.pop('quiet', None)
|
||||
to_ret = kw.pop('output', STDOUT)
|
||||
|
||||
if Logs.verbose and not kw['shell'] and not Utils.check_exe(cmd[0]):
|
||||
if Logs.verbose and not kw['shell'] and not Utils.check_exe(cmd[0], env=kw.get('env', os.environ)):
|
||||
raise Errors.WafError('Program %r not found!' % cmd[0])
|
||||
|
||||
kw['stdout'] = kw['stderr'] = subprocess.PIPE
|
||||
|
Loading…
Reference in New Issue
Block a user