port DNX's ApplicationHostContext as ProjectContext

This commit is contained in:
Andrew Stanton-Nurse 2015-10-13 14:31:29 -07:00
parent f230c84b9f
commit 9da2475e2f
85 changed files with 6676 additions and 747 deletions

View file

@ -4,12 +4,15 @@ using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
namespace Microsoft.DotNet.Cli.Utils
{
public class Command
{
private static readonly string[] WindowsExecutableExtensions = new[] { "exe", "cmd", "bat" };
private TaskCompletionSource<int> _processTcs;
private Process _process;
@ -59,6 +62,8 @@ namespace Microsoft.DotNet.Cli.Utils
{
args = " " + args;
}
var cmd = executable + args;
cmd = cmd.Replace("\"", "\\\"");
args = $"/C \"{executable}{args}\"";
executable = comSpec;
}