1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Fixed redirect issue with -run

This commit is contained in:
Brian Fiete 2025-03-21 07:50:15 -04:00
parent 494f984ba5
commit ab8fa7a91a
2 changed files with 13 additions and 6 deletions

View file

@ -9338,13 +9338,19 @@ namespace IDE
executionInstance.mStopwatch.Start();
executionInstance.mProcess = process;
executionInstance.mOutputThread = new Thread(new => ReadOutputThread);
executionInstance.mOutputThread.Start(executionInstance, false);
if (startInfo.RedirectStandardOutput)
{
executionInstance.mOutputThread = new Thread(new => ReadOutputThread);
executionInstance.mOutputThread.Start(executionInstance, false);
}
executionInstance.mErrorThread = new Thread(new => ReadErrorThread);
executionInstance.mErrorThread.Start(executionInstance, false);
if (startInfo.RedirectStandardError)
{
executionInstance.mErrorThread = new Thread(new => ReadErrorThread);
executionInstance.mErrorThread.Start(executionInstance, false);
}
if (stdInData != null)
if ((startInfo.RedirectStandardInput) && (stdInData != null))
{
executionInstance.mStdInData = new String(stdInData);
executionInstance.mInputThread = new Thread(new => WriteInputThread);

View file

@ -258,7 +258,8 @@ class GitManager
{
if (mProcess.ExitCode != 0)
{
Debug.WriteLine($"Git failed with Exit Code:{mProcess.ExitCode} Args:{mArgs} Path:{mPath}");
if (gApp.mVerbosity >= .Diagnostic)
gApp.OutputLine($"Git failed with Exit Code:{mProcess.ExitCode} Args:{mArgs} Path:{mPath}");
mFailed = true;
}
mDone = true;