Skip to content

Commit

Permalink
Make ApkBuilder less verbose (dotnet#37050)
Browse files Browse the repository at this point in the history
The output is still pretty useful and x4 times less verbose.
  • Loading branch information
EgorBo authored May 27, 2020
1 parent 32fdcaf commit 8b92b46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public class ApkBuilder
string cmake = "cmake";
string zip = "zip";

Utils.RunProcess(zip, workingDir: Path.Combine(OutputDir, "assets-tozip"), args: "-r ../assets/assets.zip .");
Utils.RunProcess(zip, workingDir: Path.Combine(OutputDir, "assets-tozip"), args: "-q -r ../assets/assets.zip .");
Directory.Delete(Path.Combine(OutputDir, "assets-tozip"), true);

if (!File.Exists(androidJar))
Expand Down
6 changes: 3 additions & 3 deletions tools-local/tasks/mobile.tasks/AndroidAppBuilder/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static string RunProcess(
IDictionary<string, string>? envVars = null,
string? workingDir = null,
bool ignoreErrors = false,
bool silent = false)
bool silent = true)
{
LogInfo($"Running: {path} {args}");
var outputBuilder = new StringBuilder();
Expand All @@ -52,16 +52,16 @@ public static string RunProcess(

Process? process = Process.Start(processStartInfo);
if (process == null)
throw new ArgumentException("Process.Start({path} {args}) returned null process");
throw new ArgumentException($"Process.Start({path} {args}) returned null process");

process.ErrorDataReceived += (sender, e) =>
{
if (!silent)
{
LogError(e.Data);
outputBuilder.AppendLine(e.Data);
errorBuilder.AppendLine(e.Data);
}
errorBuilder.AppendLine(e.Data);
};
process.OutputDataReceived += (sender, e) =>
{
Expand Down

0 comments on commit 8b92b46

Please sign in to comment.