[PATCH] meson: correct git detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
---
 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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux