From: John Levon Date: Wed, 24 Jul 2024 08:56:04 +0000 (+0100) Subject: meson: correct git detection X-Git-Tag: v10.6.0-rc1~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce9c9e315f254f8574d1987ff0a29f19aca588df;p=thirdparty%2Flibvirt.git meson: correct git detection The current "building from git" test uses "test -d .git"; however, that doesn't work when libvirt is used as a submodule, as in that case .git is a normal file. Use "test -e .git" instead. Signed-off-by: John Levon Reviewed-by: Michal Privoznik --- diff --git a/meson.build b/meson.build index 3ab8e57e4a..231470e2ee 100644 --- a/meson.build +++ b/meson.build @@ -17,7 +17,7 @@ endif # figure out if we are building from git -git = run_command('test', '-d', '.git', check: false).returncode() == 0 +git = run_command('test', '-e', '.git', check: false).returncode() == 0 if git and not get_option('no_git') run_command('git', 'submodule', 'update', '--init', check: true)