mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-11-28 10:31:04 +00:00
One more fix #254
This commit is contained in:
parent
f60754d9d4
commit
b2db6a4b0a
|
|
@ -194,14 +194,8 @@ namespace WelsonJS.Launcher
|
||||||
{
|
{
|
||||||
int exitCode = -1;
|
int exitCode = -1;
|
||||||
|
|
||||||
string fileName = execFilePath;
|
string fileName = useCmd ? "cmd.exe" : execFilePath;
|
||||||
string adjustedArguments = arguments;
|
string adjustedArguments = useCmd ? $"/c \"{execFilePath}\" {arguments}" : arguments;
|
||||||
|
|
||||||
if (useCmd && !String.IsNullOrEmpty(workingDirectory))
|
|
||||||
{
|
|
||||||
fileName = "cmd.exe";
|
|
||||||
adjustedArguments = $"/c cd /d \"{workingDirectory}\" && \"{execFilePath}\" {arguments}";
|
|
||||||
}
|
|
||||||
|
|
||||||
var psi = new ProcessStartInfo
|
var psi = new ProcessStartInfo
|
||||||
{
|
{
|
||||||
|
|
@ -222,13 +216,9 @@ namespace WelsonJS.Launcher
|
||||||
}
|
}
|
||||||
|
|
||||||
if (exitCode != 0)
|
if (exitCode != 0)
|
||||||
{
|
|
||||||
Trace.TraceWarning($"{fileName} exit with code {exitCode}");
|
Trace.TraceWarning($"{fileName} exit with code {exitCode}");
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
Trace.TraceInformation($"{fileName} finished successfully");
|
Trace.TraceInformation($"{fileName} finished successfully");
|
||||||
}
|
|
||||||
|
|
||||||
return exitCode == 0;
|
return exitCode == 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user