示例#1
0
def GetChocolateyPath():
    path = join(
        GetEnvironmentVar("ChocolateyInstall"),
        "bin",
        "choco.exe",
    )
    return path if exists(path) else ""
示例#2
0
def GetGitPath():
    path = ""
    for p in GetEnvironmentVar("PATH").split(os.pathsep):
        if "\\Git\\" in p:
            path = join(p, "git.exe")
    return path if exists(path) else ""