What happened?
When trying to run the dab tool programatically, the tool returns status 0 when an error occurred.
Run the "dab start" tool from location "C:\Path\with\config" and then run it again programatically.
See the following program repro (wait some time to give the dab tool to exit):
static void Main(string[] args)
{
ProcessStartInfo processStartInfo = new("dab", "start")
{
UseShellExecute = true,
WorkingDirectory = @"C:\Path\with\config",
WindowStyle = ProcessWindowStyle.Minimized
};
var process = new Process
{
StartInfo = processStartInfo,
EnableRaisingEvents = true
};
process.Exited += (sender, args) =>
{
Process process = (Process)sender;
if (process != null)
{
Console.WriteLine("Exited: ExitCode " + process.ExitCode);
}
};
Console.WriteLine("Started");
process.Start();
if (process.HasExited)
{
Console.WriteLine("ExitCode " + process.ExitCode);
}
else
{
Console.WriteLine("Did not exit");
}
Console.ReadKey();
}
which leads to the following output (after some time):
Started
Did not exit
Exited: ExitCode 0
According to the good practices, the “return 0” implies that the code has executed successfully without any error.
Here, the program exited due to some error (we wanted to run the host twice from the same location).
Expected: error code different than 0.
Version
0.8.52
What database are you using?
Azure SQL
What hosting model are you using?
Local (including CLI), Static Web Apps (SWA)
Which API approach are you accessing DAB through?
REST
Relevant log output
No response
Code of Conduct
What happened?
When trying to run the dab tool programatically, the tool returns status 0 when an error occurred.
Run the "dab start" tool from location "C:\Path\with\config" and then run it again programatically.
See the following program repro (wait some time to give the dab tool to exit):
which leads to the following output (after some time):
According to the good practices, the “return 0” implies that the code has executed successfully without any error.
Here, the program exited due to some error (we wanted to run the host twice from the same location).
Expected: error code different than 0.
Version
0.8.52
What database are you using?
Azure SQL
What hosting model are you using?
Local (including CLI), Static Web Apps (SWA)
Which API approach are you accessing DAB through?
REST
Relevant log output
No response
Code of Conduct