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 <john.levon@nutanix.com>
---
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)
--
2.34.1