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

Commit 7a52d98

Browse files
Making some code more like the original
1 parent f34016b commit 7a52d98

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/GitHub.Api/OutputProcessors/ProcessManager.cs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,11 @@ public void RunCommandLineWindow(NPath workingDirectory)
100100
gitEnvironment.Configure(startInfo, workingDirectory, environment.IsCustomGitExecutable);
101101

102102
var envVars = startInfo.EnvironmentVariables;
103-
var scriptContents = new List<string> {
103+
var scriptContents = new[] {
104104
$"cd \"{envVars["GHU_WORKINGDIR"]}\"",
105+
environment.IsCustomGitExecutable? "/bin/bash" : $"PATH=\"{envVars["GHU_FULLPATH"]}\":$PATH /bin/bash"
105106
};
106-
107-
if (!environment.IsCustomGitExecutable) {
108-
scriptContents.Add($"PATH=\"{envVars["GHU_FULLPATH"]}\" /bin/bash");
109-
}
110-
else {
111-
scriptContents.Add($"/bin/bash");
112-
}
113-
114-
environment.FileSystem.WriteAllLines(envVarFile, scriptContents.ToArray());
107+
environment.FileSystem.WriteAllLines(envVarFile, scriptContents);
115108
Mono.Unix.Native.Syscall.chmod(envVarFile, (Mono.Unix.Native.FilePermissions)493); // -rwxr-xr-x mode (0755)
116109
}
117110
else

0 commit comments

Comments
 (0)