Skip to content

Commit

Permalink
Quote more paths
Browse files Browse the repository at this point in the history
  • Loading branch information
dellis1972 committed Oct 14, 2024
1 parent 71426fe commit 2a1a664
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ out string error
// basisu -unpack foo.ktx2 -ktx_only -linear -format_only 2
var linearFlag = basisUFormat.isLinearColorSpace ? "-linear" : "";
// var linearFlag = "";
var argStr = $"-unpack -file {basisFileName} -ktx_only -format_only {basisUFormat.code} {linearFlag}";
var argStr = $"-unpack -file \"{basisFileName}\" -ktx_only -format_only {basisUFormat.code} {linearFlag}";
var exitCode = Run(
args: argStr,
stdOut: out var stdOut,
Expand Down Expand Up @@ -489,7 +489,7 @@ private static bool TryBuildIntermediateFile(
{
var absImageFileName = Path.GetFullPath(imageFileName);
var uastcFlag = format.nonUastcCompatible ? "": "-uastc";
var argStr = $"-file {absImageFileName} {uastcFlag} -ktx2 -output_file {intermediateFileName}";
var argStr = $"-file \"{absImageFileName}\" {uastcFlag} -ktx2 -output_file \"{intermediateFileName}\"";
var exitCode = Run(
args: argStr,
stdOut: out var stdOut,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ out string errorMessage
)
{
errorMessage = null;
var argStr = $"-file {pngFileName} -{format.formatString} -out {intermediateFileName} -fileformat ktx -forceprimaryencoding -noNormalDetection";
var argStr = $"-file \"{pngFileName}\" -{format.formatString} -out \"{intermediateFileName}\" -fileformat ktx -forceprimaryencoding -noNormalDetection";
var exitCode = Run(
args: argStr,
stdOut: out var stdOut,
Expand Down
2 changes: 1 addition & 1 deletion Tools/MonoGame.Tools.Tests/BuilderTargetsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ bool RunBuild(string buildTool, string projectFile, params string[] parameters)
var tool = FindTool(buildTool);
var psi = new ProcessStartInfo(tool)
{
Arguments = $"build {projectFile} -t:IncludeContent {string.Join(" ", parameters)} -tl:off -bl -p:DotnetCommand=\"{tool}\"",
Arguments = $"build \"{projectFile}\" -t:IncludeContent {string.Join(" ", parameters)} -tl:off -bl -p:DotnetCommand=\"{tool}\"",
WorkingDirectory = root,
UseShellExecute = false,
RedirectStandardOutput = true,
Expand Down

0 comments on commit 2a1a664

Please sign in to comment.