Guard use of UseShellExecute in PackageManagement

To re-enable elevation, the process will need to fork. For now, don't
fail fatally.
This commit is contained in:
Andrew Schwartzmeyer
2016-07-08 13:48:36 -07:00
committed by Andrew Schwartzmeyer
parent ef2ba40ca7
commit 09f20879b8
@@ -190,9 +190,14 @@ namespace Microsoft.PackageManagement.Internal.Implementation {
public int StartProcess(string filename, string arguments, bool requiresElevation, out string standardOutput, IRequest requestObject) {
Process p = new Process();
if (requiresElevation) {
#if !CORECLR
if (requiresElevation)
{
p.StartInfo.UseShellExecute = true;
} else {
}
else
#endif
{
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
}