Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions mesonbuild/modules/gnome.py
Original file line number Diff line number Diff line change
Expand Up @@ -1417,8 +1417,10 @@ def abs_filenames(files: T.Iterable['FileOrString']) -> T.Iterator[str]:
t_args.append(f'--{program_name}={path}')
if namespace:
t_args.append('--namespace=' + namespace)
if state.environment.need_exe_wrapper() and not isinstance(state.environment.get_exe_wrapper(), EmptyExternalProgram):
t_args.append('--run=' + ' '.join(state.environment.get_exe_wrapper().get_command()))
# if not need_exe_wrapper, we get an EmptyExternalProgram. If none provided, we get NoneType
exe_wrapper = state.environment.get_exe_wrapper()
if not isinstance(exe_wrapper, (NoneType, EmptyExternalProgram)):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't this be if exe_wrapper and exe_wrapper.found():

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it cannot, because an EmptyExternalProgram will exist (not NoneType) and is found, it just evaluates to self.command = [].

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What the heck is an EmptyExternalProgram and why do we have it? sigh

t_args.append('--run=' + ' '.join(exe_wrapper.get_command()))
t_args.append(f'--htmlargs={"@@".join(kwargs["html_args"])}')
t_args.append(f'--scanargs={"@@".join(kwargs["scan_args"])}')
t_args.append(f'--scanobjsargs={"@@".join(kwargs["scanobjs_args"])}')
Expand Down