private static async Task <NPath> LookForGitInstallationPath(IGitClient gitClient, ISettings systemSettings) { NPath cachedGitInstallPath = null; var path = systemSettings.Get(Constants.GitInstallPathKey); if (!String.IsNullOrEmpty(path)) { cachedGitInstallPath = path.ToNPath(); } // Root paths if (cachedGitInstallPath != null && cachedGitInstallPath.DirectoryExists()) { return(cachedGitInstallPath); } return(await gitClient.FindGitInstallation()); }