Fix error message for find_program if program cannot be found

Currently this raises an exception because exename is undefined.
pull/2326/head
Dylan Baker 7 years ago
parent 140c463b01
commit 59a90309ab
  1. 2
      mesonbuild/interpreter.py

@ -2017,7 +2017,7 @@ class Interpreter(InterpreterBase):
if progobj is None: if progobj is None:
progobj = self.program_from_system(args) progobj = self.program_from_system(args)
if required and (progobj is None or not progobj.found()): if required and (progobj is None or not progobj.found()):
raise InvalidArguments('Program "%s" not found or not executable' % exename) raise InvalidArguments('Program "%s" not found or not executable' % args[0])
if progobj is None: if progobj is None:
return ExternalProgramHolder(dependencies.ExternalProgram('nonexistingprogram')) return ExternalProgramHolder(dependencies.ExternalProgram('nonexistingprogram'))
return progobj return progobj

Loading…
Cancel
Save