Skip to content

Commit 6f4973a

Browse files
xclaessejpakkane
authored andcommitted
wrap: Check for common "provides" typo
It is a common mistake that is hard to find because Meson silently ignore unknown sections. Better have an explicit error message.
1 parent d5ae94f commit 6f4973a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mesonbuild/wrap/wrap.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ def parse_wrap_section(self, config: configparser.ConfigParser) -> None:
224224
self.diff_files.append(path)
225225

226226
def parse_provide_section(self, config: configparser.ConfigParser) -> None:
227+
if config.has_section('provides'):
228+
raise WrapException('Unexpected "[provides]" section, did you mean "[provide]"?')
227229
if config.has_section('provide'):
228230
for k, v in config['provide'].items():
229231
if k == 'dependency_names':

0 commit comments

Comments
 (0)