From 579b8737a21ccb3bfe6c404b2866f8c8037e9c20 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 12 Apr 2022 21:50:57 -0400 Subject: [PATCH] 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. --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.47.2