Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 181706b

Browse files
committed
Fix merge
1 parent eca577b commit 181706b

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/GitHub.Api/Installer/GitInstaller.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ public ITask<NPath> SetupGitIfNeeded()
6969
private GitInstallationState VerifyGitInstallation()
7070
{
7171
var state = new GitInstallationState();
72-
state.GitExists = installDetails.GitExecutablePath.FileExists() ?? false;
73-
state.GitLfsExists = installDetails.GitLfsExecutablePath.FileExists() ?? false;
72+
state.GitExists = installDetails.GitExecutablePath.IsInitialized && installDetails.GitExecutablePath.FileExists();
73+
state.GitLfsExists = installDetails.GitLfsExecutablePath.IsInitialized && installDetails.GitLfsExecutablePath.FileExists();
7474
state.GitZipExists = installDetails.GitZipPath.FileExists();
7575
state.GitLfsZipExists = installDetails.GitLfsZipPath.FileExists();
7676

src/tests/IntegrationTests/BaseIntegrationTest.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class BaseIntegrationTest
5757
protected TestUtils.SubstituteFactory Factory { get; set; }
5858
protected static NPath SolutionDirectory => TestContext.CurrentContext.TestDirectory.ToNPath();
5959

60-
protected void InitializeEnvironment(NPath? repoPath,
60+
protected void InitializeEnvironment(NPath repoPath,
6161
NPath? environmentPath = null,
6262
bool enableEnvironmentTrace = false,
6363
bool initializeRepository = true
@@ -80,7 +80,7 @@ protected void InitializeEnvironment(NPath? repoPath,
8080
initializeRepository);
8181
}
8282

83-
private void InitializePlatform(NPath repoPath, NPath environmentPath, bool enableEnvironmentTrace,
83+
private void InitializePlatform(NPath repoPath, NPath? environmentPath, bool enableEnvironmentTrace,
8484
bool setupGit = true, string testName = "")
8585
{
8686
InitializeTaskManager();
@@ -103,7 +103,7 @@ protected void InitializeTaskManager()
103103
}
104104

105105
protected IEnvironment InitializePlatformAndEnvironment(NPath repoPath,
106-
NPath environmentPath = null,
106+
NPath? environmentPath = null,
107107
bool enableEnvironmentTrace = false,
108108
bool setupGit = true,
109109
Action<IRepositoryManager> onRepositoryManagerCreated = null,
@@ -154,7 +154,7 @@ protected void SetupGit(NPath pathToSetupGitInto, string testName)
154154

155155
var gitInstaller = new GitInstaller(Environment, TaskManager.Token, installDetails);
156156

157-
NPath result = null;
157+
NPath? result = null;
158158
Exception ex = null;
159159

160160
var setupTask = gitInstaller.SetupGitIfNeeded();
@@ -177,7 +177,7 @@ protected void SetupGit(NPath pathToSetupGitInto, string testName)
177177
throw new Exception("Did not install git");
178178
}
179179

180-
Environment.GitExecutablePath = result;
180+
Environment.GitExecutablePath = result.Value;
181181
GitClient = new GitClient(Environment, ProcessManager, TaskManager.Token);
182182
}
183183

src/tests/IntegrationTests/IntegrationTestEnvironment.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public IntegrationTestEnvironment(ICacheContainer cacheContainer,
3838

3939
Initialize(UnityVersion, installPath, solutionDirectory, repoPath.Combine("Assets"));
4040

41-
InitializeRepository(initializeRepository ? repoPath : null);
41+
InitializeRepository(initializeRepository ? (NPath?)repoPath : null);
4242

4343
this.enableTrace = enableTrace;
4444

0 commit comments

Comments
 (0)