Fixing a bug in the restore option where specifying verbosity through /v was not entirely honored.
Adding tests for implicit restore for all the affected commands. Fixing an issue where the command target was being passed to the restore command during implicit restore. Adding restore params to all commands with implicit restore. Also, implicitly set the restore output to quiet. Adding tests for the no-restore option.
This commit is contained in:
parent
dd76fec564
commit
3231295acf
14 changed files with 475 additions and 179 deletions
|
@ -37,7 +37,7 @@ namespace Microsoft.DotNet.Tools.Restore
|
|||
"/t:Restore"
|
||||
};
|
||||
|
||||
if (!parsedRestore.HasOption("verbosity"))
|
||||
if (!HasVerbosityOption(parsedRestore))
|
||||
{
|
||||
msbuildArgs.Add("/ConsoleLoggerParameters:Verbosity=Minimal");
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ namespace Microsoft.DotNet.Tools.Restore
|
|||
msbuildArgs.AddRange(parsedRestore.OptionValuesToBeForwarded());
|
||||
|
||||
msbuildArgs.AddRange(parsedRestore.Arguments);
|
||||
|
||||
|
||||
return new RestoreCommand(msbuildArgs, msbuildPath);
|
||||
}
|
||||
|
||||
|
@ -65,5 +65,12 @@ namespace Microsoft.DotNet.Tools.Restore
|
|||
|
||||
return cmd.Execute();
|
||||
}
|
||||
|
||||
private static bool HasVerbosityOption(AppliedOption parsedRestore)
|
||||
{
|
||||
return parsedRestore.HasOption("verbosity") ||
|
||||
parsedRestore.Arguments.Any(a => a.Contains("/v:")) ||
|
||||
parsedRestore.Arguments.Any(a => a.Contains("/verbosity:"));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue