restore the ability in the backend to silently find a program

Broken in commit f08eed37cb which moved
the reporting and unconditionally added it.
This commit is contained in:
Eli Schwartz 2021-11-28 12:30:44 -05:00
parent 3656b8c6d4
commit 71ae5ccb65
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
1 changed files with 4 additions and 2 deletions

View File

@ -1445,7 +1445,8 @@ external dependencies (including libraries) must go to "dependencies".''')
progobj = self.notfound_program(args)
if isinstance(progobj, ExternalProgram) and not progobj.found():
mlog.log('Program', mlog.bold(progobj.get_name()), 'found:', mlog.red('NO'))
if not silent:
mlog.log('Program', mlog.bold(progobj.get_name()), 'found:', mlog.red('NO'))
if required:
m = 'Program {!r} not found'
raise InterpreterException(m.format(progobj.get_name()))
@ -1475,7 +1476,8 @@ external dependencies (including libraries) must go to "dependencies".''')
# Only store successful lookups
self.store_name_lookups(args)
mlog.log('Program', mlog.bold(progobj.name), 'found:', mlog.green('YES'), *extra_info)
if not silent:
mlog.log('Program', mlog.bold(progobj.name), 'found:', mlog.green('YES'), *extra_info)
if isinstance(progobj, build.Executable):
progobj.was_returned_by_find_program = True
return progobj