Skip to content

Commit

Permalink
Quote all the things
Browse files Browse the repository at this point in the history
  • Loading branch information
dellis1972 committed Oct 13, 2024
1 parent 521140b commit 96421fa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion MonoGame.Framework.Content.Pipeline/ExternalTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public static int Run(string command, string arguments, out string stdout, out s
CreateNoWindow = true,
WindowStyle = ProcessWindowStyle.Hidden,
ErrorDialog = false,
FileName = fullPath,
FileName = $"\"{fullPath}\"",
UseShellExecute = false,
RedirectStandardOutput = true,
RedirectStandardError = true,
Expand Down
4 changes: 2 additions & 2 deletions Tools/MonoGame.Content.Builder.Editor/Common/Util.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ public static Process CreateProcess(string command, string arguments, string wor
if (command.EndsWith (".dll")) {
// we are referencing the dll directly. We need to call dotnet to host.
exe = Global.Unix ? "dotnet" : "dotnet.exe";
args = $"{command} {arguments}";
args = $"\"{command}\" {arguments}";
}
var _buildProcess = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = exe,
FileName = $"\"{exe}\"",
Arguments = args,
WorkingDirectory = workingDirectory,
CreateNoWindow = true,
Expand Down
4 changes: 2 additions & 2 deletions Tools/MonoGame.Tools.Tests/BuilderTargetsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ public void BuildSimpleProject()
Directory.Delete(outputPath, recursive: true);

var result = RunBuild("dotnet", Path.Combine(root, "Assets", "Projects", "BuildSimpleProject.csproj"), new string[] {
"-p:MGCBCommand=" + Path.Combine(root, "mgcb.dll")
$"-p:MGCBCommand=\"{Path.Combine(root, "mgcb.dll")}\""
});
Assert.AreEqual(true, result, "Content Build should have succeeded.");
var contentFont = Path.Combine(outputPath, "DesktopGL", "Content", "ContentFont.xnb");
Assert.IsTrue(File.Exists(contentFont), "'" + contentFont + "' should exist.");
Assert.IsTrue(File.Exists(contentFont), $"'{contentFont}' should exist.");
}
}
}

0 comments on commit 96421fa

Please sign in to comment.