You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a user asks for limited output from Chocolatey, it is not uncommon
to pipe that output to `ConvertFrom-String` or `ConvertFrom-Csv` and
manually add headers to get back an object. This allows for getting a
header row back so that the end user doesn't need to add their own
headers and discern what they are.
This also adds a StringResources static class that allows us to store
constant strings in and use them across the code to reduce duplication.
config.Features.LogValidationResultsOnWarnings=set_feature_flag(ApplicationParameters.Features.LogValidationResultsOnWarnings,configFileSettings,defaultEnabled:true,description:"Log validation results on warnings - Should the validation results be logged if there are warnings? Available in 0.10.12+.");
319
319
config.Features.UsePackageRepositoryOptimizations=set_feature_flag(ApplicationParameters.Features.UsePackageRepositoryOptimizations,configFileSettings,defaultEnabled:true,description:"Use Package Repository Optimizations - Turn on optimizations for reducing bandwidth with repository queries during package install/upgrade/outdated operations. Should generally be left enabled, unless a repository needs to support older methods of query. When disabled, this makes queries similar to the way they were done in Chocolatey v0.10.11 and before. Available in 0.10.14+.");
320
320
config.PromptForConfirmation=!set_feature_flag(ApplicationParameters.Features.AllowGlobalConfirmation,configFileSettings,defaultEnabled:false,description:"Prompt for confirmation in scripts or bypass.");
321
-
config.DisableCompatibilityChecks=set_feature_flag(ApplicationParameters.Features.DisableCompatibilityChecks,configFileSettings,defaultEnabled:false,description:"Disable Compatibility Checks - Should a warning we shown, before and after command execution, when a runtime compatibility check determines that there is an incompatibility between Chocolatey and Chocolatey Licensed Extension. Available in 1.1.0+");
321
+
config.DisableCompatibilityChecks=set_feature_flag(ApplicationParameters.Features.DisableCompatibilityChecks,configFileSettings,defaultEnabled:false,description:"Disable Compatibility Checks - Should a warning be shown, before and after command execution, when a runtime compatibility check determines that there is an incompatibility between Chocolatey and Chocolatey Licensed Extension. Available in 1.1.0+");
Copy file name to clipboardExpand all lines: src/chocolatey/infrastructure.app/commands/ChocolateySourceCommand.cs
+3
Original file line number
Diff line number
Diff line change
@@ -74,6 +74,9 @@ public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyCon
74
74
.Add("adminonly|admin-only",
75
75
"Visible to Administrators Only - Should this source be visible to non-administrators? Requires business edition (v1.12.2+). Defaults to false. Available in 0.10.8+.",
this.Log().Info(configuration.RegularOutput?"{0} Custom templates found at {1}{2}".format_with(templateDirList.Count(),ApplicationParameters.TemplatesLocation,Environment.NewLine):string.Empty);
248
+
this.Log().Info(configuration.RegularOutput?ChocolateyLoggers.Normal:ChocolateyLoggers.LogFileOnly,"{0} Custom templates found at {1}{2}".format_with(templateDirList.Count(),ApplicationParameters.TemplatesLocation,Environment.NewLine));
244
249
}
245
250
else
246
251
{
247
-
this.Log().Info(configuration.RegularOutput?"No custom templates installed in {0}{1}".format_with(ApplicationParameters.TemplatesLocation,Environment.NewLine):string.Empty);
252
+
this.Log().Info(configuration.RegularOutput?ChocolateyLoggers.Normal:ChocolateyLoggers.LogFileOnly,"No custom templates installed in {0}{1}".format_with(ApplicationParameters.TemplatesLocation,Environment.NewLine));
0 commit comments