run_command() has an unfortunate early design quirk in that it doesn't
error when the command itself errors. Recent versions of Meson warn if
you do not explicitly specify whether the return code matters by passing
`check:` to it; this prevents building util-linux (including as a
subproject) with --fatal-meson-warnings.
foreach code : codes
res = run_command('bash', '-c',
'''echo '@0@' | awk -F. '@1@' '''.format(
- meson.project_version(), code))
+ meson.project_version(), code), check: true)
pc_version += res.stdout().strip()
endforeach
pc_version = '.'.join(pc_version)