From b248f3481ced6fd0b2b1de694a83cc98d83d5b0f Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Wed, 24 Nov 2021 00:31:18 -0500 Subject: [PATCH] meson: specify when commands need to succeed in run_command meson in git master now warns about a missing `check:` kwarg, and may eventually change the default from false to true. Take the opportunity to require `objcopy --help` to succeed -- it is unlikely to fail, but if it does something insane happened. --- gio/tests/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gio/tests/meson.build b/gio/tests/meson.build index 5dbfb8e60..3f29543b1 100644 --- a/gio/tests/meson.build +++ b/gio/tests/meson.build @@ -17,7 +17,7 @@ if build_machine.system() == 'linux' libutil_name = 'libutil' libutil = run_command('sh', '-c', '''ldconfig -p | grep -o "[[:space:]]@0@\.so\(\.[0-9]\+\)\?\b"''' - .format(libutil_name)).stdout().strip().split('\n') + .format(libutil_name), check: false).stdout().strip().split('\n') if libutil.length() > 0 message('Found libutil as @0@'.format(libutil[0])) @@ -683,7 +683,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() objcopy_supports_add_symbol = false objcopy = find_program('objcopy', required : false) if objcopy.found() - objcopy_supports_add_symbol = run_command(objcopy, '--help').stdout().contains('--add-symbol') + objcopy_supports_add_symbol = run_command(objcopy, '--help', check: true).stdout().contains('--add-symbol') endif ld = find_program('ld', required : false)