Skip to content

Commit 5101244

Browse files
eli-schwartznirbheek
authored andcommitted
restore the ability in the backend to silently find a program
Broken in commit f08eed3 which moved the reporting and unconditionally added it.
1 parent e94abb8 commit 5101244

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

mesonbuild/interpreter/interpreter.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,7 +1399,8 @@ def find_program_impl(self, args, for_machine: MachineChoice = MachineChoice.HOS
13991399
progobj = self.notfound_program(args)
14001400

14011401
if isinstance(progobj, ExternalProgram) and not progobj.found():
1402-
mlog.log('Program', mlog.bold(progobj.get_name()), 'found:', mlog.red('NO'))
1402+
if not silent:
1403+
mlog.log('Program', mlog.bold(progobj.get_name()), 'found:', mlog.red('NO'))
14031404
if required:
14041405
m = 'Program {!r} not found'
14051406
raise InterpreterException(m.format(progobj.get_name()))
@@ -1429,7 +1430,8 @@ def find_program_impl(self, args, for_machine: MachineChoice = MachineChoice.HOS
14291430

14301431
# Only store successful lookups
14311432
self.store_name_lookups(args)
1432-
mlog.log('Program', mlog.bold(progobj.name), 'found:', mlog.green('YES'), *extra_info)
1433+
if not silent:
1434+
mlog.log('Program', mlog.bold(progobj.name), 'found:', mlog.green('YES'), *extra_info)
14331435
if isinstance(progobj, build.Executable):
14341436
progobj.was_returned_by_find_program = True
14351437
return progobj

0 commit comments

Comments
 (0)