meson: Specify check arg in run_command()

Fixes the following 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: https://github.com/mesonbuild/meson/issues/9300
master
Simon Ser 2024-04-20 00:14:11 +02:00 committed by Andri Yngvason
parent 15660cd4a7
commit 3c596455e8
1 changed files with 2 additions and 2 deletions

View File

@ -24,8 +24,8 @@ c_args = [
version = '"@0@"'.format(meson.project_version()) version = '"@0@"'.format(meson.project_version())
git = find_program('git', native: true, required: false) git = find_program('git', native: true, required: false)
if git.found() if git.found()
git_commit = run_command([git, 'rev-parse', '--short', 'HEAD']) git_commit = run_command([git, 'rev-parse', '--short', 'HEAD'], check: false)
git_branch = run_command([git, 'rev-parse', '--abbrev-ref', 'HEAD']) git_branch = run_command([git, 'rev-parse', '--abbrev-ref', 'HEAD'], check: false)
if git_commit.returncode() == 0 and git_branch.returncode() == 0 if git_commit.returncode() == 0 and git_branch.returncode() == 0
version = '"v@0@-@1@ (@2@)"'.format( version = '"v@0@-@1@ (@2@)"'.format(
meson.project_version(), meson.project_version(),