[AddonManager] Utilities add Check Git Binary
This commit is contained in:
committed by
Yorik van Havre
parent
a0455c24d1
commit
08211490f3
@@ -314,3 +314,16 @@ def getRepoUrl(text):
|
||||
return "https://framagit.org/freecad-france/mooc-workbench"
|
||||
print("Debug: addonmanager_utilities.getRepoUrl: Unkable to find repo:",text)
|
||||
return None
|
||||
|
||||
|
||||
def checkGitBinary():
|
||||
|
||||
"Checks if Git binary is available"
|
||||
|
||||
import platform
|
||||
import distutils.spawn
|
||||
if platform.system() == 'Windows':
|
||||
git_exe = distutils.spawn.find_executable("git.exe")
|
||||
else: #Linux or Mac
|
||||
git_exe = 'git'
|
||||
return git_exe
|
||||
|
||||
Reference in New Issue
Block a user