Skip to content

Commit

Permalink
[release/6.0.4xx] class-parse/generator response file space fix (#7106)
Browse files Browse the repository at this point in the history
Context: #5926
Fixes: dotnet/maui#8049

There was a bug causing response files to not work when trying to bind
Java libraries in a path containing a space, since the CLI argument
given to `class-parse`/`generator` was not properly quoted.

This has been fixed in 67ce902, however this is
a .NET 7 only PR.

Pull the fix out of that PR and port it to the `6.0.4xx` branch so it
will go into a .NET 6 servicing release.
  • Loading branch information
jpobst committed Jun 17, 2022
1 parent b21267f commit 64ecc3e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Xamarin.Android.Build.Tasks/Tasks/ClassParse.cs
Expand Up @@ -38,7 +38,7 @@ protected override string GenerateCommandLineCommands ()
WriteLine (sw, $"\"{doc}\"");
}

cmd.AppendSwitch ($"@{responseFile}");
cmd.AppendSwitch ($"\"@{responseFile}\"");

return cmd.ToString ();
}
Expand Down
4 changes: 2 additions & 2 deletions src/Xamarin.Android.Build.Tasks/Tasks/Generator.cs
Expand Up @@ -236,8 +236,8 @@ protected override string GenerateCommandLineCommands ()
WriteLine (sw, "--use-legacy-java-resolver=true");
}

cmd.AppendSwitch (ApiXmlInput);
cmd.AppendSwitch ($"@{responseFile}");
cmd.AppendSwitch ($"\"{ApiXmlInput}\"");
cmd.AppendSwitch ($"\"@{responseFile}\"");
return cmd.ToString ();
}

Expand Down

0 comments on commit 64ecc3e

Please sign in to comment.