Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix run_targets running scripts from different subdirs. #8526

Merged
merged 1 commit into from Mar 14, 2021
Merged

Conversation

jpakkane
Copy link
Member

No description provided.

@@ -4008,6 +4008,8 @@ def func_run_target(self, node, args, kwargs):
if isinstance(i, dependencies.ExternalProgram) and not i.found():
raise InterpreterException(f'Tried to use non-existing executable {i.name!r}')
cleaned_args.append(i)
if isinstance(cleaned_args[0], str):
cleaned_args[0] = self.func_find_program(node, cleaned_args[0], {})
Copy link
Member

Choose a reason for hiding this comment

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

Should do that in custom_target() and generator() too for consistency. And probably if it's a File too. OTOH that would be new features, so for 0.57.2 this is probably enough.

Copy link
Member

Choose a reason for hiding this comment

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

While at it, add_*_script() does some custom lookup in _find_source_script() instead of using find_program() that is subtly not the same thing. IMHO we should remove that code to use fin_program().

And run_command_impl() also does yet another subtly different thing.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll file a separate MR for those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants