Skip to content

Commit e604130

Browse files
committed
Change nugetize default to non-verbose
We were showing MSBuild output for any nugetize run that took longer than 10 seconds. Diagnosing slow builds shouldn't be a nugetizer issue, and it makes it confusing to see potentially many warnings and what-not that are irrelevant to packing. Make it so instead of asking for quiet, you can ask for verbose and get the output. If there were errors running the tool, we'd still want to see the MSBuild output, though.
1 parent 4016310 commit e604130

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/dotnet-nugetize/Program.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Program
2626

2727
bool binlog = Debugger.IsAttached;
2828
bool debug = Debugger.IsAttached && Environment.GetEnvironmentVariable("DEBUG_NUGETIZER") != "0";
29-
bool quiet = false;
29+
bool verbose = false;
3030
string items;
3131
List<string> extra;
3232

@@ -85,7 +85,7 @@ int Run(string[] args)
8585
{ "?|h|help", "Display this help.", h => help = h != null },
8686
{ "b|bl|binlog", "Generate binlog.", b => binlog = b != null },
8787
{ "d|debug", "Debug nugetizer tasks.", d => debug = d != null, true },
88-
{ "q|quiet", "Don't render MSBuild output.", q => quiet = q != null },
88+
{ "v|verbose", "Render MSBuild output.", v => verbose = v != null },
8989
{ "i|items:", "MSBuild items file path containing full package contents metadata.", i => items = Path.GetFullPath(i) },
9090
{ "version", "Render tool version and copyright information.", v => version = v != null },
9191
}
@@ -455,11 +455,10 @@ bool Execute(string program, string arguments) //=> AnsiConsole.Status().Start("
455455
if (!timedout)
456456
output.Append(proc.StandardOutput.ReadToEnd());
457457

458-
if (quiet)
459-
return proc.ExitCode == 0;
458+
if (!verbose && proc.ExitCode == 0)
459+
return true;
460460

461-
if (timedout || proc.ExitCode != 0)
462-
Console.Out.Write(output.ToString());
461+
Console.Out.Write(output.ToString());
463462

464463
return proc.ExitCode == 0;
465464
}

0 commit comments

Comments
 (0)