Skip to content

Commit

Permalink
meson: Explicitly set run_command() check parameter
Browse files Browse the repository at this point in the history
Set the "check" parameter in run_command() calls, instead of relying on
the default value, which might get changed at some point in the future.

This silences the following Meson warning:

  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
  • Loading branch information
aperezdc committed Sep 12, 2024
1 parent 5b1c5e4 commit 1d4a8b8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ project('wpebackend-fdo', ['c', 'cpp'],
'cpp_std=c++11',
],
license: 'BSD-2-Clause',
version: run_command(join_paths('scripts', 'version.py')).stdout().strip(),
version: run_command(join_paths('scripts', 'version.py'), check: true).stdout().strip(),
)

# This refers to the API level provided. This is modified only with major,
Expand Down Expand Up @@ -109,10 +109,7 @@ endif

wayland_scanner = find_program(wayland_scanner_candidates, native: true)

r = run_command(wayland_scanner, '--version')
assert(r.returncode() == 0,
'''Cannot execute wayland-scanner:
''' + r.stderr())
r = run_command(wayland_scanner, '--version', check: true)
wayland_scanner_version = r.stderr().split()
if not (wayland_scanner_version.length() == 2)
wayland_scanner_version = r.stdout().split()
Expand Down

0 comments on commit 1d4a8b8

Please sign in to comment.