-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Hi,
You may have an issue on InternalRun(string cmd, string workingdir, bool bRedirectStreams).
You plan to setup env variable for starting new process this way...
p.StartInfo.EnvironmentVariables[key] = mEnvironmentVariables[key] as string;
.. but since you setup p.StartInfo.UseShellExecute = false;
to redirect stderr/stdin, the process will in fact take env variable from current one.
https://social.msdn.microsoft.com/Forums/vstudio/en-US/7f668b1c-e982-4d5b-b229-0b0e0cf9c249/processstartinfo-environment-amp-useshellexecute?forum=netfxbcl
This fix let me transfer proper cm.exe location that is not in global PATH env. variable..
foreach (string key in mEnvironmentVariables.Keys)
{
//p.StartInfo.EnvironmentVariables[key] =
// mEnvironmentVariables[key] as string;
Environment.SetEnvironmentVariable(key, mEnvironmentVariables[key] as string);
}
Regads,
Charles
Metadata
Metadata
Assignees
Labels
No labels