Fix error message for find_program if program cannot be found
Currently this raises an exception because exename is undefined.
@@ -2017,7 +2017,7 @@ class Interpreter(InterpreterBase):
if progobj is None:
progobj = self.program_from_system(args)
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:
return ExternalProgramHolder(dependencies.ExternalProgram('nonexistingprogram'))
return progobj
