Fix quoting of arguments to handle things with spaces in them

This commit is contained in:
David Fowler 2015-10-22 03:32:32 -07:00
parent 893440aaef
commit f8837f7717
2 changed files with 5 additions and 6 deletions

View file

@ -98,14 +98,13 @@ namespace Microsoft.DotNet.Tools.Publish
}
// Compile the project (and transitively, all it's dependencies)
var result = Command.Create("dotnet-compile", $"--framework {context.TargetFramework.DotNetFrameworkName} {context.ProjectFile.ProjectDirectory}")
var result = Command.Create("dotnet-compile", $"--framework {context.TargetFramework.DotNetFrameworkName} \"{context.ProjectFile.ProjectDirectory}\"")
.ForwardStdErr()
.ForwardStdOut()
.Execute();
if (result.ExitCode != 0)
{
Reporter.Error.WriteLine("Compilation failed!".Red().Bold());
return result.ExitCode;
}