Quote MSBuild arguments. Fixes #11892

This commit is contained in:
Ignacio Etcheverry 2017-10-07 01:21:11 +02:00
parent fdc3de009c
commit 14280ac44b
2 changed files with 5 additions and 1 deletions

View File

@ -106,7 +106,7 @@ namespace GodotSharpTools.Build
private string BuildArguments(string loggerAssemblyPath, string loggerOutputDir, string[] customProperties) private string BuildArguments(string loggerAssemblyPath, string loggerOutputDir, string[] customProperties)
{ {
string arguments = string.Format("{0} /v:normal /t:Build /p:{1} /l:{2},{3};{4}", string arguments = string.Format(@"""{0}"" /v:normal /t:Build ""/p:{1}"" ""/l:{2},{3};{4}""",
solution, solution,
"Configuration=" + config, "Configuration=" + config,
typeof(GodotBuildLogger).FullName, typeof(GodotBuildLogger).FullName,

View File

@ -461,6 +461,10 @@ void GodotSharpBuilds::BuildProcess::start(bool p_blocking) {
if (p_blocking) { if (p_blocking) {
exited = true; exited = true;
exit_code = klass->get_field("exitCode")->get_int_value(mono_object); exit_code = klass->get_field("exitCode")->get_int_value(mono_object);
if (exit_code != 0 && OS::get_singleton()->is_stdout_verbose())
OS::get_singleton()->print(String("MSBuild finished with exit code " + itos(exit_code) + "\n").utf8());
build_tab->on_build_exit(exit_code == 0 ? MonoBuildTab::RESULT_SUCCESS : MonoBuildTab::RESULT_ERROR); build_tab->on_build_exit(exit_code == 0 ? MonoBuildTab::RESULT_SUCCESS : MonoBuildTab::RESULT_ERROR);
} else { } else {
build_instance = MonoGCHandle::create_strong(mono_object); build_instance = MonoGCHandle::create_strong(mono_object);