Skip to content

Commit

Permalink
wrap: Check for common "provides" typo
Browse files Browse the repository at this point in the history
It is a common mistake that is hard to find because Meson silently
ignore unknown sections. Better have an explicit error message.
  • Loading branch information
xclaesse authored and jpakkane committed May 20, 2023
1 parent d5ae94f commit 6f4973a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mesonbuild/wrap/wrap.py
Expand Up @@ -224,6 +224,8 @@ def parse_wrap_section(self, config: configparser.ConfigParser) -> None:
self.diff_files.append(path)

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

0 comments on commit 6f4973a

Please sign in to comment.