Skip to content
Permalink
Browse files

[Launcher] Also use normal output data for error output of PackageIns…

…tall.exe
  • Loading branch information
xen2 committed Jan 10, 2019
1 parent a0459e3 commit 8608ff091cae91a2f740e5523e09c0d27b7d6476
Showing with 11 additions and 4 deletions.
  1. +10 −3 sources/assets/Xenko.Core.Packages/NugetStore.cs
  2. +1 −1 sources/tools/Xenko.PackageInstall/Program.cs
@@ -757,14 +757,21 @@ private static void RunPackageInstall(string packageInstall, string arguments, P

process.OutputDataReceived += (_, args) =>
{
// Report progress
if (progress != null && !string.IsNullOrEmpty(args.Data))
if (!string.IsNullOrEmpty(args.Data))
{
var matches = powerShellProgressRegex.Match(args.Data);
int percentageResult;
if (matches.Success && int.TryParse(matches.Groups[1].Value, out percentageResult))
{
progress.UpdateProgress(ProgressAction.Install, percentageResult);
// Report progress
progress?.UpdateProgress(ProgressAction.Install, percentageResult);
}
else
{
lock (process)
{
errorOutput.AppendLine(args.Data);
}
}
}
};
@@ -73,7 +73,7 @@ static int Main(string[] args)
}
catch (Exception e)
{
Console.WriteLine($"Error: {e}");
Console.Error.WriteLine($"Error: {e}");
return 1;
}
}

0 comments on commit 8608ff0

Please sign in to comment.
You can’t perform that action at this time.