aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/wrap
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2021-01-25 22:55:06 -0500
committerEli Schwartz <eschwartz@archlinux.org>2021-01-26 08:09:53 -0500
commit9d602e65314b1d57de115d49b8f4a447c597404f (patch)
treea8cab06a6c85e0590804694cdb5825f8125b1b11 /mesonbuild/wrap
parent0f5a136c40cfe521e7080460c316609468d4433b (diff)
downloadmeson-9d602e65314b1d57de115d49b8f4a447c597404f.zip
meson-9d602e65314b1d57de115d49b8f4a447c597404f.tar.gz
meson-9d602e65314b1d57de115d49b8f4a447c597404f.tar.bz2
do not require git installed in order to use wraps
It doesn't make sense to check for the presence of git every time we use it, but short-circuit any attempt to use a wrap right from the get-go because we are trying to be fancy with submodules. If git is not installed, simply do not try to figure out whether the wrap is a submodule that can potentially be checked out/updated for the user. Just take it on faith that it isn't one. Fixes #2623
Diffstat (limited to 'mesonbuild/wrap')
-rw-r--r--mesonbuild/wrap/wrap.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/wrap/wrap.py b/mesonbuild/wrap/wrap.py
index 34e58e3..cce44a8 100644
--- a/mesonbuild/wrap/wrap.py
+++ b/mesonbuild/wrap/wrap.py
@@ -353,8 +353,10 @@ class Resolver:
raise WrapException(m)
def resolve_git_submodule(self) -> bool:
+ # Is git installed? If not, we're probably not in a git repository and
+ # definitely cannot try to conveniently set up a submodule.
if not GIT:
- raise WrapException('Git program not found.')
+ return False
# Are we in a git repository?
ret, out = quiet_git(['rev-parse'], self.subdir_root)
if not ret: