From b8a97fd367fcdc313e4e2a55177cd85818f24ffb Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 12 Jul 2023 09:47:44 +1000 Subject: [PATCH] meson.build: fix the ratbagd runtime check find_program(required: true) exits with the meson error message if the program is not found so we never get to our pretty error message. Fix this and make the message an actual error too. Also indent the else condition correctly while we're here. --- meson.build | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/meson.build b/meson.build index 2dc88d8..c93f720 100644 --- a/meson.build +++ b/meson.build @@ -16,7 +16,7 @@ enable_runtime_dependency_checks = get_option('runtime-dependency-checks') # Dependencies if enable_runtime_dependency_checks - ratbagd = find_program('ratbagd', required: true) + ratbagd = find_program('ratbagd', required: false) ratbagd_required_version='0.17' if not ratbagd.found() @@ -31,16 +31,16 @@ if enable_runtime_dependency_checks else r = run_command(ratbagd, '--version') if r.returncode() != 0 or r.stdout().version_compare('<' + ratbagd_required_version) - error(''' - ************************ ERROR ***************************** - * ( )( * - * (\-. ) ( ) ratbagd found in $PATH is too * - * / _`> .---------. old and will not work with * - * _) / _)= |'-------'| this version of Piper. Please * - *( / _/ |O O o| update libratbag/ratbagd. * - * `-.__(___)_ | o O . o | * - ************************************************************ - ''') + error(''' + ************************ ERROR ***************************** + * ( )( * + * (\-. ) ( ) ratbagd found in $PATH is too * + * / _`> .---------. old and will not work with * + * _) / _)= |'-------'| this version of Piper. Please * + *( / _/ |O O o| update libratbag/ratbagd. * + * `-.__(___)_ | o O . o | * + ************************************************************ + ''') endif endif