Skip to content

Commit

Permalink
Use find_program also in custom_target for consistency.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpakkane committed Mar 24, 2021
1 parent 9b27d11 commit 80c89a6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mesonbuild/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4010,6 +4010,9 @@ def _func_custom_target_impl(self, node, args, kwargs):
mlog.warning('''Custom target input \'%s\' can\'t be converted to File object(s).
This will become a hard error in the future.''' % kwargs['input'], location=self.current_node)
kwargs['env'] = self.unpack_env_kwarg(kwargs)
if 'command' in kwargs and isinstance(kwargs['command'], list) and kwargs['command']:
if isinstance(kwargs['command'][0], str):
kwargs['command'][0] = self.func_find_program(node, kwargs['command'][0], {})
tg = CustomTargetHolder(build.CustomTarget(name, self.subdir, self.subproject, kwargs, backend=self.backend), self)
self.add_target(name, tg.held_object)
return tg
Expand Down

0 comments on commit 80c89a6

Please sign in to comment.