Iam trying to implement git cherrypicking
.
My process hangs when I close the merge tool without solving mergeconflicts, since airaxis tool asks for Was the merge successful? [y/n].
How do I check if my process is waiting for input?
How can I read the message?
I would like to fetch the output before the process has exited.
Can you please help.
Here is my code.
member this.ProcessOutputDataReceived(e : DataReceivedEventArgs) =
if not(String.IsNullOrWhiteSpace(e.Data)) then
this.output <- this.output @ [e.Data]
System.Diagnostics.Debug.WriteLine(e.Data)
()
member this.ExecuteCommandWait(program, args, wd) =
this.Program <- program
let startInfo = ProcessStartInfo(FileName = program,
Arguments = args,
CreateNoWindow = true,
UseShellExecute = false,
RedirectStandardOutput = true,
RedirectStandardError = true,
RedirectStandardInput = true,
WindowStyle = ProcessWindowStyle.Hidden,
WorkingDirectory = wd)
this.proc <- new Process(StartInfo = startInfo)
this.proc.ErrorDataReceived.Add(this.ProcessErrorDataReceived)
this.proc.OutputDataReceived.Add(this.ProcessOutputDataReceived)
this.proc.Start()
this.proc.BeginOutputReadLine()
this.proc.BeginErrorReadLine()
this.proc.WaitForExit()