Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change nugetize default to non-verbose #313

Merged
merged 1 commit into from
Feb 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/dotnet-nugetize/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Program

bool binlog = Debugger.IsAttached;
bool debug = Debugger.IsAttached && Environment.GetEnvironmentVariable("DEBUG_NUGETIZER") != "0";
bool quiet = false;
bool verbose = false;
string items;
List<string> extra;

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

if (quiet)
return proc.ExitCode == 0;
if (!verbose && proc.ExitCode == 0)
return true;

if (timedout || proc.ExitCode != 0)
Console.Out.Write(output.ToString());
Console.Out.Write(output.ToString());

return proc.ExitCode == 0;
}
Expand Down