Example #1
0
 private GitInstallationState FindGitLfs(GitInstallationState state)
 {
     if (!state.GitLfsIsValid)
     {
         var gitLfsPath = new FindExecTask("git-lfs", cancellationToken)
                          .Configure(processManager, dontSetupGit: true)
                          .Progress(progressReporter.UpdateProgress)
                          .Catch(e => true)
                          .RunSynchronously();
         state.GitLfsExecutablePath = gitLfsPath;
         state = ValidateGitLfsVersion(state);
         if (state.GitLfsIsValid)
         {
             state.GitLfsInstallationPath = state.GitLfsExecutablePath.Parent;
         }
     }
     return(state);
 }
Example #2
0
        private GitInstallationState FindGit(GitInstallationState state)
        {
            if (!state.GitIsValid)
            {
                var gitPath = new FindExecTask(TaskManager,
                                               platform.ProcessManager.DefaultProcessEnvironment, platform.Environment,
                                               "git", cancellationToken)
                              .Configure(platform.ProcessManager)
                              .Progress(progressReporter.UpdateProgress)
                              .Catch(e => true)
                              .RunSynchronously();

                state.GitExecutablePath = gitPath;
                state = ValidateGitVersion(state);
                if (state.GitIsValid)
                {
                    state.GitInstallationPath = gitPath.Parent.Parent;
                }
            }
            return(state);
        }