[pangomm/wip/lantw/meson-Don't-check-if-.git-is-a-directory] meson: Don't check if .git is a directory



commit ebe647e251441ed278e44db503ee7c3a7f1e19b0
Author: Ting-Wei Lan <lantw src gnome org>
Date:   Sun Dec 1 21:44:00 2019 +0800

    meson: Don't check if .git is a directory
    
    In a git worktree, .git is a regular file. Fix the check by just testing
    whether .git exists.

 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index ae0927b..b7dbea8 100644
--- a/meson.build
+++ b/meson.build
@@ -51,7 +51,7 @@ endif
 cmd_py = '''
 import os
 import sys
-sys.exit(0 if os.path.isdir("@0@") else 1)
+sys.exit(0 if os.path.exists("@0@") else 1)
 '''.format(project_source_root / '.git')
 is_git_build = run_command(python3, '-c', cmd_py).returncode() == 0
 


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