Skip to content

Commit

Permalink
meson: Add check parameter to run_command
Browse files Browse the repository at this point in the history
This fixes warnings:

Program xsltproc found: YES (/usr/bin/xsltproc)
WARNING: You should add the boolean check kwarg to the run_command call.
         It currently defaults to false,
         but it will default to true in future releases of meson.
         See also: mesonbuild/meson#9300

Signed-off-by: Petr Vorel <pvorel@suse.cz>
  • Loading branch information
pevik committed Jul 9, 2024
1 parent 8037de5 commit a6c1b8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if xsltproc.found()
xsltproc_works = true
foreach doc_target : doc_targets
xsl = 'http://docbook.sourceforge.net/release/xsl-ns/current/' + doc_target + '/docbook.xsl'
testrun = run_command([xsltproc, '--nonet', xsl])
testrun = run_command([xsltproc, '--nonet', xsl], check: false)
if testrun.returncode() != 0
xsltproc_works = false
message('WARNING: xsltproc: cannot process ' + xsl)
Expand Down
4 changes: 2 additions & 2 deletions test/ping/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
ipv6_dst = []
ipv6_switch = []
ip = find_program('ip', required: false)
if ip.found() and run_command(ip, '-6', 'a').stdout().contains('::1')
if ip.found() and run_command(ip, '-6', 'a', check: false).stdout().contains('::1')
message('IPv6 enabled')
ipv6_dst = [ '::1' ]
ipv6_switch = [ '-6' ]
Expand All @@ -18,7 +18,7 @@ else
endif

run_as_root = false
r = run_command('id', '-u')
r = run_command('id', '-u', check: false)
if r.stdout().strip().to_int() == 0
message('running as root')
run_as_root = true
Expand Down

0 comments on commit a6c1b8d

Please sign in to comment.