aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/interpreter/mesonmain.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/mesonbuild/interpreter/mesonmain.py b/mesonbuild/interpreter/mesonmain.py
index 74b5978..5781e03 100644
--- a/mesonbuild/interpreter/mesonmain.py
+++ b/mesonbuild/interpreter/mesonmain.py
@@ -87,13 +87,13 @@ class MesonMain(MesonInterpreterObject):
FeatureNew.single_use(f'Passing executable/found program object to script parameter of {name}',
'0.55.0', self.subproject, location=self.current_node)
largs.append(prog)
- largs.extend(args)
- return self.interpreter.backend.get_executable_serialisation(largs)
- elif isinstance(prog, mesonlib.File):
- FeatureNew.single_use(f'Passing file object to script parameter of {name}',
- '0.57.0', self.subproject, location=self.current_node)
- found = self.interpreter.find_program_impl([prog])
- largs.append(found)
+ else:
+ if isinstance(prog, mesonlib.File):
+ FeatureNew.single_use(f'Passing file object to script parameter of {name}',
+ '0.57.0', self.subproject, location=self.current_node)
+ found = self.interpreter.find_program_impl([prog])
+ largs.append(found)
+
largs.extend(args)
es = self.interpreter.backend.get_executable_serialisation(largs)
es.subproject = self.interpreter.subproject