MCPcopy Create free account
hub / github.com/URLab-Sim/UnrealRoboticsLab / RunGit

Method RunGit

Source/URLab/URLab.Build.cs:402–424  ·  view source on GitHub ↗
(string WorkingDir, string Arguments)

Source from the content-addressed store, hash-verified

400 }
401
402 private static string RunGit(string WorkingDir, string Arguments)
403 {
404 ProcessStartInfo PSI = new ProcessStartInfo("git", Arguments)
405 {
406 WorkingDirectory = WorkingDir,
407 RedirectStandardOutput = true,
408 RedirectStandardError = true,
409 UseShellExecute = false,
410 CreateNoWindow = true,
411 };
412 using (Process Proc = Process.Start(PSI))
413 {
414 string Stdout = Proc.StandardOutput.ReadToEnd();
415 string Stderr = Proc.StandardError.ReadToEnd();
416 Proc.WaitForExit();
417 if (Proc.ExitCode != 0)
418 {
419 throw new Exception(string.Format("git {0} exited {1}: {2}",
420 Arguments, Proc.ExitCode, Stderr.Trim()));
421 }
422 return Stdout.Trim();
423 }
424 }
425
426 private static string ParseSubmodulePointerSha(string Output, string Package)
427 {

Callers

nothing calls this directly

Calls 1

StartMethod · 0.80

Tested by

no test coverage detected