meson: explicitly mark run_command as fallible when returncode is checked

Meson emits a warning stating that the default will change from false to
true, in some future version, and that one should always pass
`check: BOOL` explicitly. Normally this is because commands that
unexpectedly fail would result in wrong behavior if the build treats it
as though it succeeded.

In this case, we were specifically relying on it being `check: false`,
as the returncode is immediately checked in order to provide a better
error message. Make this explicit in the meson.build file.

Signed-off-by: Eli Schwartz <[email protected]>
This commit is contained in:
Eli Schwartz committed 2026-10-27 12:14:33 -04:00
1 parent 92969629bd
commit 2b4e79faa7
1 file changed
+2 -2
+2 -2
View File
@@ -28,7 +28,7 @@ endif
perl = find_program(get_option('with-perl')) perl = find_program(get_option('with-perl'))
ret = run_command([perl, '-MExtUtils::Embed', '-e', 'ccopts']) ret = run_command([perl, '-MExtUtils::Embed', '-e', 'ccopts'], check: false)
if ret.returncode() != 0 if ret.returncode() != 0
error('perl: Failed to get cflags') error('perl: Failed to get cflags')
endif endif
@@ -38,7 +38,7 @@ foreach flag : ret.stdout().strip().split(' ')
endif endif
endforeach endforeach
ret = run_command([perl, '-MExtUtils::Embed', '-e', 'ldopts']) ret = run_command([perl, '-MExtUtils::Embed', '-e', 'ldopts'], check: false)
if ret.returncode() != 0 if ret.returncode() != 0
error('perl: Failed to get ldflags') error('perl: Failed to get ldflags')
endif endif