From: Eli Schwartz Date: Wed, 13 Apr 2022 01:50:57 +0000 (-0400) Subject: meson: validate the return code of subprocess commands X-Git-Tag: v2.39-rc1~713 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=579b8737a21ccb3bfe6c404b2866f8c8037e9c20;p=thirdparty%2Futil-linux.git meson: validate the return code of subprocess commands 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. --- diff --git a/meson.build b/meson.build index 06c89b53e4..9c8db310ed 100644 --- a/meson.build +++ b/meson.build @@ -47,7 +47,7 @@ pc_version = [] 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)