summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/fetch_strategy.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py
index 0e848652ae..c463a0e5d8 100644
--- a/lib/spack/spack/fetch_strategy.py
+++ b/lib/spack/spack/fetch_strategy.py
@@ -345,8 +345,7 @@ class GitFetchStrategy(VCSFetchStrategy):
@property
def git_version(self):
- git = which('git', required=True)
- vstring = git('--version', return_output=True).lstrip('git version ')
+ vstring = self.git('--version', return_output=True).lstrip('git version ')
return Version(vstring)
@@ -356,6 +355,7 @@ class GitFetchStrategy(VCSFetchStrategy):
self._git = which('git', required=True)
return self._git
+
@_needs_stage
def fetch(self):
self.stage.chdir()