From ce9c9e315f254f8574d1987ff0a29f19aca588df Mon Sep 17 00:00:00 2001 From: John Levon Date: Wed, 24 Jul 2024 09:56:04 +0100 Subject: [PATCH] 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 --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)