Abdesol
Abdesol
CC#
Created by Abdesol on 7/4/2024 in #help
standard output from Process not giving any output for certain commands
ah, I really appreciate your cooperation and absolutely no rush
73 replies
CC#
Created by Abdesol on 7/4/2024 in #help
standard output from Process not giving any output for certain commands
great! and yeah, it does actually clone, just doesn't show the progress bar and the lines that come after that
73 replies
CC#
Created by Abdesol on 7/4/2024 in #help
standard output from Process not giving any output for certain commands
that is an issue for later
73 replies
CC#
Created by Abdesol on 7/4/2024 in #help
standard output from Process not giving any output for certain commands
btw, you have to click enter to get back to the path part
73 replies
CC#
Created by Abdesol on 7/4/2024 in #help
standard output from Process not giving any output for certain commands
that is the old one
73 replies
CC#
Created by Abdesol on 7/4/2024 in #help
standard output from Process not giving any output for certain commands
73 replies
CC#
Created by Abdesol on 7/4/2024 in #help
standard output from Process not giving any output for certain commands
sorry not this one ig
73 replies
CC#
Created by Abdesol on 7/4/2024 in #help
standard output from Process not giving any output for certain commands
@SparkyCracked
73 replies
CC#
Created by Abdesol on 7/4/2024 in #help
standard output from Process not giving any output for certain commands
73 replies
CC#
Created by Abdesol on 7/4/2024 in #help
standard output from Process not giving any output for certain commands
could you share the link
73 replies
CC#
Created by Abdesol on 7/4/2024 in #help
standard output from Process not giving any output for certain commands
what was the way to share it? binpath?
73 replies
CC#
Created by Abdesol on 7/4/2024 in #help
standard output from Process not giving any output for certain commands
yeah, I will probably make this simple terminal public if it gets to work well
73 replies
CC#
Created by Abdesol on 7/4/2024 in #help
standard output from Process not giving any output for certain commands
may I share the code? it is just a one file code
73 replies
CC#
Created by Abdesol on 7/4/2024 in #help
standard output from Process not giving any output for certain commands
actually, I just checked and the error task is the one responsible for the git clone output
73 replies
CC#
Created by Abdesol on 7/4/2024 in #help
standard output from Process not giving any output for certain commands
the first one is from the error output, and the second one is from the actual output
73 replies
CC#
Created by Abdesol on 7/4/2024 in #help
standard output from Process not giving any output for certain commands
No description
73 replies
CC#
Created by Abdesol on 7/4/2024 in #help
standard output from Process not giving any output for certain commands
okay will check it out
73 replies
CC#
Created by Abdesol on 7/4/2024 in #help
standard output from Process not giving any output for certain commands
oh, interesting.. let me check rq
73 replies
CC#
Created by Abdesol on 7/4/2024 in #help
standard output from Process not giving any output for certain commands
for windows no suffix, and the prefix is /C and shell is cmd.exe
73 replies
CC#
Created by Abdesol on 7/4/2024 in #help
standard output from Process not giving any output for certain commands
async Task ExecuteCommand(string command, string workingDirectory)
{
try
{
var processStartInfo = new ProcessStartInfo
{
FileName = shell,
Arguments = commandPrefix + command + commandSuffix,
WorkingDirectory = workingDirectory,
RedirectStandardOutput = true,
RedirectStandardInput = true,
RedirectStandardError = true,
UseShellExecute = false,
CreateNoWindow = true
};

using var process = new Process();
process.StartInfo = processStartInfo;
process.Start();

var outputTask = OutputToConsole(process.StandardOutput, process);
var errorTask = OutputToConsole(process.StandardError, process);
var inputTask = InputToProcess(process);

await process.WaitForExitAsync();

await Task.WhenAll(outputTask, errorTask, inputTask);
}
catch (Exception e)
{
Console.WriteLine($"ErrorN: {e}");
}
}
async Task ExecuteCommand(string command, string workingDirectory)
{
try
{
var processStartInfo = new ProcessStartInfo
{
FileName = shell,
Arguments = commandPrefix + command + commandSuffix,
WorkingDirectory = workingDirectory,
RedirectStandardOutput = true,
RedirectStandardInput = true,
RedirectStandardError = true,
UseShellExecute = false,
CreateNoWindow = true
};

using var process = new Process();
process.StartInfo = processStartInfo;
process.Start();

var outputTask = OutputToConsole(process.StandardOutput, process);
var errorTask = OutputToConsole(process.StandardError, process);
var inputTask = InputToProcess(process);

await process.WaitForExitAsync();

await Task.WhenAll(outputTask, errorTask, inputTask);
}
catch (Exception e)
{
Console.WriteLine($"ErrorN: {e}");
}
}
this is the function where I am dealing with the process and the tasks.. is there anything I am missing here?
73 replies